Patching 14 day cycle
Hello,
Is there a way to set your patch jobs up to run bi weekly or every 14 days. Kace suppot says no but there are some forums that mention otherwise. Any ideas? I dont want to patch ever week and I want to patch more that once a month.
I have 7 Patch Jobs that will run daily every 20 minutes. Each day they will handle a different department.
So Location one will have 7 patch jobs run between 10a and 12 noon on Tuesday
Location two will have 7 patch jobs run between 10a and 12 noon on Wed.
____
My Cron job for each patch deployment will look like this.
Patch Job 1 at 10a on Tuesday - * 10 * * 2/2
Patch Job 2 at 10:20a on Tuesday - 20 10 * * 2/2
Patch Job 3 at 10:40 on Tuesday – 40 10 * * 2/2
And so on. ( and I want this job to run again in two weeks….
Then on Wednesday
Patch Job 1 at 10a on Wed - * 10 * * 3/2
Patch Job 2 at 10:20a on Wed - 20 10 * * 3/2
Patch Job 3 at 10:40a on Wed - 40 10 * * 3/2
And so on (and I want this Wednesday job to run again in two weeks.)
Am I on the right track?
Answers (2)
Sure, you can patch every 14 days, you would just have to set up a custom schedule and use cron to create the time.
If you wanted to patch every other Tuesday at 8pm for example, it would be something like this:
* 20 * * 2/2
Bear in mind that the cron implementation in the K1000 is classic cron, not the full version, so not all commands/variables will be available to use.
Here is a tool for cron generation: http://www.openjs.com/scripts/jslibrary/demos/crontab.php
From the 2009 Konference: http://www.kace.com/~/media/Files/Support/KACE-Konference/2009/KBOX-Power-Management.ashx
Comments:
-
So in the last entry 2/2. Does the 2 designate Tuesday and the /2 represent every other? - NinjaTurtle 10 years ago
-
Correct. The days start with Sunday (zero) and run through Saturday (six) The /2 would be every second instance of that day. Test this out on a small group and verify it works. I've had issues getting the K1000 patching to work when trying to specify specify days. I wound up going the date route. - rockhead44 10 years ago
-
ah so maybe I can duplicate my jobs and then just schedule each with a different date. So If I have a Java patch job I can just set one to run on the 1st and another to run on the 14th. - NinjaTurtle 10 years ago
-
This link will help as well. http://www.unix.com/man-page/freebsd/5/crontab/ - jknox 10 years ago
So Location one will have 7 patch jobs run between 10a and 12 noon on Tuesday
Location two will have 7 patch jobs run between 10a and 12 noon on Wed.
____
My Cron job for each patch deployment will look like this.
Patch Job 1 at 10a on Tuesday - * 10 * * 2/2
Patch Job 2 at 10:20a on Tuesday - 20 10 * * 2/2
Patch Job 3 at 10:40 on Tuesday – 40 10 * * 2/2
And so on. ( and I want this job to run again in two weeks….
Then on Wednesday
Patch Job 1 at 10a on Wed - * 10 * * 3/2
Patch Job 2 at 10:20a on Wed - 20 10 * * 3/2
Patch Job 3 at 10:40a on Wed - 40 10 * * 3/2
And so on (and I want this Wednesday job to run again in two weeks.)
Am I on the right track? - NinjaTurtle 10 years ago