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.
- Pack
- ScheduleTaskAndPoll
- Tasks
- 5
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