Cron is creating empty files, how to stop this?

h0feer

Member
Nov 24, 2016
15
1
3
serbia
cPanel Access Level
Root Administrator
Hello to everyone,


I'm using Cron from cPanel to complete some automatic tasks to my website , i have setup the cron command like this :


Code:
* * * * * wget -q https://www.mydomain.com/cron/WonProductNotification >/dev/null 2>&1
and each time it's completing the task it's creating files like this "WonProductNotification" with empty content, yesterday i couldn't even login to my server using ftp because of these much files that was created by cron , around 50k files ..

Can someone tell me what to do in this case? how to make cron do it's job without creating these files?


I already tried to change the command like this "wget -O link >/dev/null 2>&1 but cron is not working then after i change from -q to O ,

can someone help me please?


Thanks in advance.
 
Last edited by a moderator:

h0feer

Member
Nov 24, 2016
15
1
3
serbia
cPanel Access Level
Root Administrator
Did you try this way?

Code:
wget --quiet -O

or

Code:
wget -q --spider
Hi, thanks for your reply.

please explain it a little bit clear , you mean try like this :
Code:
wget --quiet -O https://www.mydomain.com/cron/WonProductNotification >/dev/null 2>&1
 
Last edited by a moderator:

vacancy

Well-Known Member
Sep 20, 2012
556
223
93
Turkey
cPanel Access Level
Root Administrator
Code:
* * * * * wget --quiet -O https://www.mydomain.com/cron/WonProductNotification >/dev/null 2>&1
Code:
* * * * * wget -q --spider https://www.mydomain.com/cron/WonProductNotification >/dev/null 2>&1
 

h0feer

Member
Nov 24, 2016
15
1
3
serbia
cPanel Access Level
Root Administrator
Code:
* * * * * wget --quiet -O https://www.mydomain.com/cron/WonProductNotification >/dev/null 2>&1
Code:
* * * * * wget -q --spider https://www.mydomain.com/cron/WonProductNotification >/dev/null 2>&1


Hi,


i just tried both of these examples, none of them works , means when i change them like you said Cron is not doing it's job... any another suggestion please?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello,

Are you able to execute the script instead of downloading the file? For instance, what exactly is the cron job and the file doing?

Thank you.