Schedule Task and Poll

This playbook will schedule a specified command and monitor for completion by looking for output in context. Make the playbook context shared globally if you have a command that returns to Context automatically and you have a specific key to monitor. The key monitored must be a single field value and not an array.

Schedule Task and Poll · 5 tasks · 6 inputs · 1 output

Inputs

  • Command — Command to Schedule
  • Cron — In the format * * * * * Min Hour Day(Month) Month Day(Week) i.e. 1 9 * * * 9:01 AM - (server time) run !GetTime to see server time
  • Number of Times to Run — How many times to run before stopping (based on cron as well)
  • OutputContextValue — Provide the Key of the value that will be output from the command to poll for completion. If specifying a context value of a command that already outputs to Context set context for sub-playbook to be shared globally.
  • FrequencyToPoll — Frequency to run polling command to check context (in minutes)
  • RegExVal — The regex to check the field for. By default the regex contains .+, which matches anything other than None.

Outputs

  • SchedulingTask.schedResults — Results from command executed

Flowchart

yes Start Start Schedule Command - ScheduleCommand Schedule Command ScheduleCommand Context Polling - Generic - Single Output - Context Polling - Generic Context Polling - Generic... Context Polling - Generic Specific Output Key? Specific Output Key? Context Polling - Generic - Array Output - Context Polling - Generic Context Polling - Generic... Context Polling - Generic