Cron-Style Tasking deeper Scheduling
-
i have a task that I want to run every quarter. This would be */4 which implies the following set {0,4,8} which means it only runs 3x a year, so it really should be */3 which implies {0,3,6,9} so we get 4x a year. Unfortunately this task will need to be cascaded among a lot of different computers and I’d like to space them out over the quarters. So if this is correct then I should be able to put something like (wild+1)/3 which should imply {1,4,7,10}; (wild+2)/3 => {2,5,8,12}. ((the wilds were put in cuz * caused auto formatting))
To test this theory I’ve been playing with the Hours section and watching when the task activates and this does not work for (*+1)/2 which should flag the task every odd hour.
I know I can do this kind of thing with a list and maybe I should, but I was wondering if there is a more elegant way to state this in the fields?
-
Where are you setting this?
Cron is always in the form of:
The first * represents the minute, or every minute, so */4 * * * * would make the item run every 4 minutes.
The second * represents the hour, or every hour, so * */4 * * * would make the item run every minute every 4th hour (00:00 - 00:59,04:00-04:59,08:00-08:59,etc…).
The third * represents the month, or every month, so * * */4 * * would make the item run every minute of every hour on the 4th month, or three times a year. If you want it every quarter, you’d make it: * * */3 * *.
The fourth * represents the day of the month, so * * * */4 * would make the item run every minute of every hour of every month on every fourth day of the month.
The fifth * represents the day of the week, 0 and 7 I think both equal Sunday. 1 Monday, 2 three and so on. So * * * * */4 would make the task run the full time every fourth day of the week, so if today was sunday: Thursday, Monday, Friday, Tuesday, etc…
-
Also, it’d be good to know what version of FOG you’re running which should be in the “cloud” logo at the top of the page. Also remember, we’re not creating normal cron tasks the way most others may think. So there’s bound to be a difference or two. I know the current setup is as close as I could make it. If you can think of a better way of handing the representation of the next run times and proper implementation through a PHP and GUI friendly interface, I’d love to see it. I’m all about trying to better things.