
I didn't know about the */5 use for the minutes – It makes life simpler indeed. ]]> http://underpop.online.fr/n/nielshorn/2009/07/flexible-scheduling/comment-page-1/#comment-36 gmbastos Mon, 12 Oct 2009 07:55:34 +0000 http://underpop.online.fr/n/nielshorn/blog/?p=48#comment-36 Greetings, Niels.<br /><br />I just think cron isn't that bad but, sure, a front-end would be highly appreciated by many people.<br /><br />I'm dropping in this comment just to tell you that "crontab -e" is a better way to edit your crontab: the command is shorter and it handles crontab restarting for you.<br /><br />Another "crontip": instead of adding 12 entries in order to run the same command each five minutes, you could simply use a "*/5 * * * *" instead.<br /><br />As an example, experiment adding the following line to your crontab:<br /><br />*/2 * * * * date "cron command run on: +%Y%m%d-%H:%M" >> ~/cronlog.log<br /><br />Then you go take a coffe, return and issue a "crontab -e" and comment out that line, otherwise it would fill your hard drive with test-junk. Finally, a "cat ~/cronlog.log" will show the results.<br /><br />So your crontab could look like this, instead:<br /><br /># Special 5-minute-interval job<br />*/5 * * * * /usr/local/sbin/sched5 1> /dev/null<br /><br />Have fun. :) Greetings, Niels.
I just think cron isn't that bad but, sure, a front-end would be highly appreciated by many people.
I'm dropping in this comment just to tell you that "crontab -e" is a better way to edit your crontab: the command is shorter and it handles crontab restarting for you.
Another "crontip": instead of adding 12 entries in order to run the same command each five minutes, you could simply use a "*/5 * * * *" instead.
As an example, experiment adding the following line to your crontab:
*/2 * * * * date "cron command run on: +%Y%m%d-%H:%M" >> ~/cronlog.log
Then you go take a coffe, return and issue a "crontab -e" and comment out that line, otherwise it would fill your hard drive with test-junk. Finally, a "cat ~/cronlog.log" will show the results.
So your crontab could look like this, instead:
# Special 5-minute-interval job
*/5 * * * * /usr/local/sbin/sched5 1> /dev/null
Have fun.