Automating Orchestrator 2012 Runbooks with Scheduled Tasks

I was recently faced with the challenge of having some Orchestrator 2012 runbooks fire off on a schedule, mainly for custom Active Directory reports that other teams want to receive on a regular basis.  Since the days of doing such tedious tasks manually are (thankfully) long gone, I decided to use Orchestrator to automate the creation and distribution of these reports.

The Problem

While it’s a fairly well known fact that Orchestrator has this ability built in via the Monitor Date/Time Activity, I have a hard time stomaching the fact that the runbook has to be running all the time just for its five minutes per week to be useful.  So naturally you think about scheduled tasks, but they you have to write a Powershell script for every runbook you want to automate, then create a corresponding Scheduled Task, label it something useful, set it up, test it, and so on.  I also considered launching all periodic runbooks from a master scheduler runbook, which wasn’t a bad idea, but everytime I wanted to add another report, I would have to rework this master runbook which would eventually swell to a Krakken-esque monster of lines, activities, data passing, and other headaches.

Continue reading