Run Custom Schedule - Patching
How would you guys read the following crontab schedule?
0 8 1-7 * 0
I read it as 8am first Sunday of the month. Right?
I had this run custom schedule for a patch deploy and for some reason it ran at 8am today (Thursday). Am I missing something? I'm curious to know why it ran today and not Sunday.
Thanks
Andy
EDIT: Update. I just wanted to be sure I was not crazy and created a detect and deploy schedule to run on a couple of test workstations. I used 30 9 1-7 * 0 for the run custom patch schedule. At 9:30 today it started running on my two test workstations.
Again, am I reading it wrong? First number is the minutes, second is the hour, third is the day of the month, fourth is the month and last is the day of the week (0=sunday).
0 8 1-7 * 0
I read it as 8am first Sunday of the month. Right?
I had this run custom schedule for a patch deploy and for some reason it ran at 8am today (Thursday). Am I missing something? I'm curious to know why it ran today and not Sunday.
Thanks
Andy
EDIT: Update. I just wanted to be sure I was not crazy and created a detect and deploy schedule to run on a couple of test workstations. I used 30 9 1-7 * 0 for the run custom patch schedule. At 9:30 today it started running on my two test workstations.
Again, am I reading it wrong? First number is the minutes, second is the hour, third is the day of the month, fourth is the month and last is the day of the week (0=sunday).
0 Comments
[ + ] Show comments
Answers (8)
Please log in to answer
Posted by:
GillySpy
13 years ago
It is possible if you are willing to do what my post here says:
http://itninja.com/question/silent-uninstall-oracle-8-cilent7470&mpage=1&key=𒺭
Basically for patching this would mean:
This patch schedule would have no machine's to work on unless it is the first saturday of the month.
http://itninja.com/question/silent-uninstall-oracle-8-cilent7470&mpage=1&key=𒺭
Basically for patching this would mean:
- setup your patch schedule to run every day
- setup your patch schedule to target a machine label "Machines for 1st saturday of month
- setup a second machine label that looks at "Machines for 1st Saturday of month" and adds a time component
select ID from MACHINE JOIN
MACHINE_LABEL_JT ML ON ML.MACHINE_ID=MACHINE.ID
JOIN LABEL L ON L.ID=ML.LABEL_ID
WHERE
L.NAME='Machines for 1st Saturday of month'
/*********** adjust this for each sched *************/
/*first saturday of month*/
and DAYOFMONTH(CURDATE())>0
and DAYOFMONTH(CURDATE())<7
and DAYOFWEEK(CURDATE())=7
This patch schedule would have no machine's to work on unless it is the first saturday of the month.
Posted by:
climberbry
11 years ago
Posted by:
dchristian
13 years ago
Posted by:
TJSmithCIQ
13 years ago
I think this is how crontab is supposed to normally work, but for some reason the K1 does not treat it that way. K1 will run it at 8am every day between the 1st and 7th, and every Sunday. Basically cumulative rather than exclusive.
I tried the same thing, and ran into the same problem, because we want to run patching in relation to the date of MS Patch Tuesday. (Example: Patch a QA group on the Thursday after Patch Tuesday, then patch everyone on the next Thursday.) Unfortunately my work-around is to manually change the schedule every month, which stinks. I would love it if it could work this way.
I tried the same thing, and ran into the same problem, because we want to run patching in relation to the date of MS Patch Tuesday. (Example: Patch a QA group on the Thursday after Patch Tuesday, then patch everyone on the next Thursday.) Unfortunately my work-around is to manually change the schedule every month, which stinks. I would love it if it could work this way.
Posted by:
GillySpy
13 years ago
In crontab you should specify a day of week OR a day of month but not both.
0 8 1-7 * 0
What you wrote actually means, 0800h on the 1-7 days of the month for any month and every sunday
What you want is not possible, but let's say you wanted the first day of the month at 8am then you should write:
0 8 1 * ?
The ? negates that option.
0 8 1-7 * 0
What you wrote actually means, 0800h on the 1-7 days of the month for any month and every sunday
What you want is not possible, but let's say you wanted the first day of the month at 8am then you should write:
0 8 1 * ?
The ? negates that option.
Posted by:
clementa
13 years ago
So there is no way to run a custom schedule for what I want (first saturday, second sunday etc..)?
With the number of workstations I have I'd like to schedule patch deploys on the weekend and on different weekends at that during the month. I know I can pick a day of the week but having 30K+ workstations patching every single weekend would be a bit much don't you think?
I could spread it out during the week at night but we shut down almost all our workstations to conserve power.
Thanks,
With the number of workstations I have I'd like to schedule patch deploys on the weekend and on different weekends at that during the month. I know I can pick a day of the week but having 30K+ workstations patching every single weekend would be a bit much don't you think?
I could spread it out during the week at night but we shut down almost all our workstations to conserve power.
Thanks,
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.