I have a cron job on my host:
/ramdisk/bin/php5 -q /home2/sharingi/public_html/scrape/copyV2.php
That is just plain not running. The 'support' is tel开发者_开发百科ling me that -q
is quiet mode and that is why I am not receiving any output emails of any kind...
However all my other cron jobs have been and are running with -q
and have been sending me output emails... for months.
I was searching around but can't find what the -q
flag does, so can you tell me?
The -q flag suppresses HTTP header output. As long as your script itself does not send anything to stdout, -q will prevent cron from sending you an email every time the script runs. For example, print and echo send to stdout. Avoid using these functions if you want to prevent cron from sending you email.
-q
is basically "quietly" meaning your cron job will run without verbose, i.e, without showing the output, how program is executing the code.
Remember: how the program runs the code is different than what is outputting the result. If you are getting some output then that may be the result of file associated for cron. But how cron is working is hidden and you will not receive any alert mail for it.
精彩评论