December 9th, 2010, 03:30 AM
I thought I knew Cron.....
....But then I saw this syntax:
can anyone tell me what the */10 means in the minutes column?
*/10 * * * * cmd/to/run
More importantly, I'm trying to stop it attempting to send emails. at the moment I have
BUt after my server updated it's version of plesk I'm now getting emails, can i do
path/to/php path/to/script/to/run > path/to/log/file
to prevent emails?
path/to/php path/to/script/to/run > path/to/log/file > /dev/null 2>&1
December 9th, 2010, 07:55 AM
I believe the */10 means every 10 minutes - at HH:10, HH:20, HH:30, etc.
If your script produces emails then redirecting output is not going to prevent the mails from being pushed out by the mailer program being used - even if you could do what you are trying (the double redirection).
If you don't want mails beign sent then just comment out (or remove) that entry from your crontab. Problem with that, of course, is if you want other things the script does. In that case you'll need to find the 'payload' within the script and comment that part out.
The moon on the one hand, the dawn on the other:
The moon is my sister, the dawn is my brother.
The moon on my left and the dawn on my right.
My brother, good morning: my sister, good night.
-- Hilaire Belloc
December 9th, 2010, 05:09 PM
It is a truism of American politics that no man who can win an election deserves to. --Trevanian, from the novel Shibumi