[wellylug] Crontab entry

Ewen McNeill wellylug at ewen.mcneill.gen.nz
Sun Jan 25 20:44:54 NZDT 2004


In message <1075000055.8992.1.camel at Gir>, Jamie Dobbs writes:
># only get small emails during 'peak' hours (Mon-Fri 6pm-2:45am, Sat/Sun
># 12pm-2:45am)
>*/15 18-2 * * 1-5 ~/bin/getsmallmailnow
>*/15 12-2 * * 6,7 ~/bin/getsmallmailnow

Your hour ranges seem rather confused: last I looked 2 was not after 18
(or 12 for that matter).  So I suspect that'll lead to at least those
lines, and possibly the whole crontab, being ignored due to those types
of errors.  (Your system logs might tell you more.)

Perhaps you want something like:

*/15 18-23 * * 1-5 ~/bin/getsmallmailnow
*/15 0-2   * * 2-6 ~/bin/getsmallmailnow
*/15 12-23 * * 6,7 ~/bin/getsmallmailnow
*/15 0-2   * * 7,1 ~/bin/getsmallmailnow

which seems to correspond to your description of the hours it should
operate.

(As others have commented you'll also want to check that the
~/bin/getsmallmailnow script is able to run without your default
environment; eg that it sets its PATH appropriately or uses full paths,
has its own config details, etc.)

Ewen



More information about the wellylug mailing list