Currently, I have one php function which is running with cron. It's the function to check the timestamp and close the topic. To check the timestamp and make live update, I have to use cron. I run cron with this command
wget -q http://www.example.com/program/timecheck
Everything seems working perfectly, so I didn't check my server for quite long. But today, I checked and found out that there are more than 500,000 of files called timecheck are created at root directory.
I checked through the code and it's sure that there's no code for creating the file.
What I would like to know is, is it because of the wget -q command ? If that's what command should i use to execute the url ?
Thanks for your help.
With Regards,
Assuming this is a Linux-like OS,
wget -O /dev/null -q http://www.example.com/program/timecheck
The file is the output from wget. This option (-O
) tells it to write the output to /dev/null
, thus discarding it.
yes, by default wget will save a file and it will create append version to file downloaded to avoid force replace
-q
is just disable the verbose message
you can override this with :-
wget -O /tmp/log.file ${url} // this will always replace the /tmp/log.file
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With