I have this so far: 00 23 * * 5 and this is just every Friday at 11pm. Is it possible to make it every second Friday of every month at 11pm?

1 Comment   [ + ] Show Comment

Comments

  • It seems like there would be a lot of IT departments interested in doing patching once per month after "patch Tuesday." That's exactly what my new boss wants, so I would be interested if anyone comes up with an exact solution for this.
Please log in to comment

Community Chosen Answer

2

not with the cron implementation of the KACE unfortunately.

Answered 07/12/2013 by: Nico_K
Red Belt

  • Some further detail: http://www.itninja.com/question/kace-cron-scheduling
Please log in to comment

Answers

0

Best you can do would be to give it a date range, say, the 8th to the 14th. So something like...

0 23 8,9,10,11,12,13,14 * 5 (you might be able to do 8-14 too)

You can't actually build in the logic to run in the second Friday of the month using just the cron scheduling, intelligence like that would have to be builtin to the script you are running.

 

Answered 07/12/2013 by: erik.ragan
Senior Yellow Belt

Please log in to comment
0

So here is how I have solved this for patching in my environment but you can do this for other parts of the Kbox too. You can use Help Desk Ticket rules to modify anything in the Kbox database.

Disclaimer: You would want to be very careful and probably test this in a test environment because you could accidently cause major problems with your database. Currently I'm running this in 5.4SP1.

First in your Patch Schedule set the "Run on the" setting. It doesn't matter what date you set here but make sure to put in every month and the time you want the patch to run.

You would want to create a custom ticket rule that runs Monthly and set the Next run date to the first of the month. It's very important that this runs on the 1st of every month to make this rule work. In the Select Query Section put this in:

select distinct IM_CRON.days_of_month, IM_CRON.ID,  PATCHLINK_SCHEDULE.DESCRIPTION, PATCHLINK_SCHEDULE.IM_CRON_ID
FROM IM_CRON, PATCHLINK_SCHEDULE
where PATCHLINK_SCHEDULE.DESCRIPTION
= 'PatchSchedule' and IM_CRON.ID = PATCHLINK_SCHEDULE.IM_CRON_ID;


Note: Replace PatchSchedule with a the name of your Patch Schedule.

Next click the check box for Run an update query, using the results from the one above

Now put this in for the Update Query:

update  IM_CRON set DAYS_OF_MONTH=14-dayofweek(curdate()) where IM_CRON.ID in (<TICKET_IDS>);


Now just save it and this should change your patch schedule every month to the second Friday.

Informational note: For some reason the Kron numbers for the days of the week is 0-6 where 0 starts on Saturday in the Kbox. I believe Kron is supposed to start on Sunday for 0 but the Kbox works differently from my testing.

Answered 07/12/2013 by: darkhawktman
Green Belt

Please log in to comment
Answer this question or Comment on this question for clarity
Nine Simple (but Critical) Tips for Effective Patch Management
This paper reviews nine simple tips that can make patch management simpler, more effective and less expensive.

Share