Runbook schedule question
-
Thursday, April 19, 2012 10:08 AM
Hi, following on from my last question on Scheduling SCOM Maintenance Mode (thanks Anders), I now have a working runbook which reads the list of servers to be patched from the patch lists maintained by the server team, eg Wk1Mon, Wk1Wed, Wk2Mon, Wk2Wed,..Wk3..,Wk4.
They use a patching tool which references these files basically by using windows task scheduler configured as weekly schedules set to recur every 4 weeks on a particular day, eg Monday. So for example the Wk1Mon schedule is NOT necessarily the first week of the month, it is the 4th week since the last time it ran which may be any Monday in a given month not necessarily the 1st!.
In Orchestrator I cannot mimic this scedule as the Orchestrator scheduler only allows to select the day of week, eg Monday and the Occurance, ie if it the 1st,2nd,3rd,4th,Last so this will not keep in step with the schedule configured with the Windows scheduler above.
Is there any solution that I can do to set up something that will effectively mimic the Windows scheduler?
Apologies if not explained very well! Any help much appreciated...
All Replies
-
Thursday, April 19, 2012 11:33 AM
Hi,
Two thoughts spring to mind, neither of them address your question directly I guess.
1) Would it be possible to integrate the patching tool into Orchestrator, so you only have a single place to control the scheduling from ?
2) Would it be possible to have the patching process set a "flag" somewhere that your runbook picks up when the patching process starts, and and completes. This could be as simple as a file with a list of hostnames(or a single file for each host) updated on your runbook server (or some accessible share). You could then check every 5/10/(n) minutes for the existance of the file(s), and update the maintance mode.
If you wanted to take that idea further, then perhaps you could use a database, and build in some history / tracking into the database (who / when / why etc)
Again this would mean that there is only a single place to control the scheduling, which avoids the almost inevitable "oh we had to change the schedule, didn't we tell you?" problems that happen when trying to replicate schedules into different tools.
rich
-
Thursday, April 19, 2012 3:05 PM
Hi Richard,
was hoping there might have been something I could tweak using the 'out-of-box' activities or maybe a community pack which had better scheduling control, but by the sounds of it that doesnt look the case?
Re your suggestions
1) Not sure its possible to integrate the tool (Shavlik) into orchestrator - might just be my lack of knowledge but don't think I could use this option.
2) Yes prob setting up a flagging process, capturing status etc in a database is a workable solution - it'll need a bit of though how to set this up. I don't need anything complicated or include any audit/tracking info so really just initial though is to set a flag to say its in state to set for MaintMode. However just thinking about it I may be able to hook into the patching scheduled from Shavlik - it starts a Shavlik interactive service on the machine and also generates a PsShutdown command at end of patching process. these events are captured in the Event log so it may be possibel to write a SCOM event monitor to generate an alert for 'Pending patch shutdown' and place the machine in MaintMode based on this event - which mich be a more granular.accurate way to apply MaintMode, rather than they and 'shadow' the schedule uses by shavilk, ie ignore the schedule approach entirely and instead just look from SCOM generated events/alerts.
Thanks for your suggestions, has generated some food for thought. looks like theres several ways to try and do this but unfortunately all will require a bit more effort than I hoped, would still be nice if their was a good scheduler Management pack to utilise!
-
Thursday, May 10, 2012 7:48 PMOwnerYou could actually use Task Scheduler to set schedules to run runbooks. The interface would be easier to use than any IP you could create and it might not make sense to have to create a runbook to schedule the execution of runbooks (kind of weird).
Robert Hearn, Sr. Program Manager
Private Cloud Orchestration
Cloud & Datacenter Management, Microsoft Corp.
Orchestrator Blog http://blogs.technet.com/b/Orchestrator Orchestrator on CodePlex: http://orchestrator.codeplex.com
-
Thursday, May 10, 2012 8:49 PMHi Robert, sorry if this is a dumb question but how would you use Task Scheduler to run the required runbook, ie what are the action parameters for Starting the program or runbook in my case? I never though of initiating the runbook this way, if it works it would be a ideal solution to my problem. Thanks!!
-
Saturday, May 12, 2012 4:37 PMAnswerer
Hey new2scom,
A bit of elaboration on Robert's suggestion http://opalis.wordpress.com/2012/05/12/initiating-runbooks-from-task-scheduler/
-
Monday, May 14, 2012 2:14 PM
Ryan, thanks for the link - thats VERY helpful and think should give me the info I need to look to schedule the runbook through Task scheduler via the Web Service/powershell interface.
Thanks again! :-)
-
Wednesday, May 16, 2012 10:39 AM
Guys, I've tried to take a look at the powershell via Web Service interface but seem to be having a problem listing all the runbooks available to get the runbook GUID - basically some are just missing. Is this just a 'feature' of the RC version of the software or have I an error on my install/web service?. Is there any other way to get runbook GUID
Thanks
-
Wednesday, May 16, 2012 7:19 PMAnswerer
Hey new2scom,
Looks like Robert put together a tool that should help a bit
His latest release also allows for initiating via runbook path which should help you (instead of looking up the GUID of the runbook just put the path to your runbook, this will be in the form of "\rootfolder\folder\runbookname"
90532
by rhearn
(2 downloads)Tue
7:52 PMAssociated with Release: SCO Job Runner - Command Line Utility.
SCOJobRunner:
- Added "-RunbookPath" parameter to allow specifying the runbook by path instead of the runbook ID
- Added "-UseSSL" parameter to allow using https instead of http
- Added checking for "/?", "-help", "/help" on the command line.
- Some refactoring to compartmentalize code- Edited by Ryan AndorferMVP, Editor Wednesday, May 16, 2012 9:02 PM
- Marked As Answer by Robert_HearnOwner Thursday, May 31, 2012 5:29 PM

