Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 7538  / 1 Year ago, sat, january 14, 2023, 6:22:39

It creates files with 0 Bytes, with the same name as the php being called in the task.



I have a task that runs every minute, my folder /root is crowded.



My task:



* * * * * /usr/bin/wget -q https://domain/script.php


How to stop creating these files?


More From » cron

 Answers
0

Why?



Because this is what wget command is doing and because your cron job call wget at every minute. From man wget:




GNU Wget is a free utility for non-interactive download of files from the Web.




It creates files with 0 bytes because probably script.php does not return nothing in non-interactive mode.



How to stop creating these files?



Run in terminal next command to open the crontab file:



crontab -e


and delete or comment the line:



* * * * * /usr/bin/wget -q https://domain/script.php


Save the crontab file and close it.



Or just simple use:



crontab -r


to remove your crontab file.



If you want to make the cron job only to access https://domain/script.php every minute, then use curl, ping or maybe lynx. For example:



* * * * * curl https://domain/script.php


More about: http://v1.corenominal.org/howto-setup-a-crontab-file/


[#30264] Sunday, January 15, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
itchlos

Total Points: 486
Total Questions: 115
Total Answers: 110

Location: Macau
Member since Fri, Apr 28, 2023
1 Year ago
;