var sidebar_align = 'right';
var content_container_margin = parseInt('350px');
var sidebar_width = parseInt('330px');
I have a 3 scripts that I want to run every 5 hours. But, I don't want the 3 scripts running in the same hour.
When does cron run for the first time? After entering every 5 hours, will it run for the first time 5 hours from now or something other? If I enter one cron now and another 2 hours from now and the 3rd one 4 hours from now will that spread them apart so that they won't usually over lap?
You could probably create it like this
0 0,5,10,15,20 * * * /script1.sh
0 1,6,11,16,21 * * * /script2.sh
0 2,7,12,17,22 * * * /script3.sh
Since 24 hours doesn't divide equally in to 5 hours very well, you will always have an issue making the last cron end up 5 hours with the above method.
I know it's not entirely what you're looking for, but hope it helps.
Thanks, I picked 5 hours to kind of randomize it, so that it the time would not be the same every day. I'll probably have to experiment. But, otherwise, your method looks good.
Originally Posted by
How interesting... I found this:
0 8-17/2 * * * /path/command
Which between the hours of 8am and 3pm (maybe 5pm) would run every 2 hours. I say maybe 5pm, because I'm unclear if the cron would run at 1700.
By web_host in forum Dedicated Server
Last Post: 04-11-2012, 02:31 AM
By build-a-host in forum Running a Web Hosting Business
Last Post: 02-22-2008, 04:54 AM
By pal_web in forum Hosting Security and Technology
Last Post: 06-16-2006, 02:43 PM
By PGF in forum Dedicated Server
Last Post: 01-11-2003, 06:57 PM
By Domenico in forum Dedicated Server
Last Post: 04-03-2001, 06:15 PM