Quick Cron Question

Jun 8, 2000
94
0
0
If I want a job to run hourly at 15 minutes past the hour from 10 PM to 3 AM, how do I set up the crontab? Is it:

15 22-3 * * * user cmd

or

15 22-23,0-3 * * * user cmd

Your response before 10 PM EST is appreciated! ;-)

-DSP
 

Armitage

Banned
Feb 23, 2001
8,086
0
0
This one should work
15 0,1,2,3,22,23 * * * cmd

AFAIK, you're second should work, but I'm not sure about the first ... ie. if ranges will wrap around. I suspect that it will, but I'd want to test it. Why not set up a test job and see if it wraps around in minutes?