Hi Roger,
I want a way to run the first job, and then somehow check every X minutes to see if that manual change happened, and if so, schedule the 2nd job to run now .. and stop checking for that change.
One approach is to set up a ‘verifier job’ (e.g., a job scheduled to check for changes every 5 minutes) that can be triggered by the first job. If the verifier job detects the required change, it should launch the second job and then disable itself.
Regards!
Hi Roger,
but then why does the verifier job disable itself?
In my approach, to avoid the constant 5-minutes verification, if a match is found, the second job is launched, and the verifier job is disabled to stop further checks. This verifier job is enabled by the 1st job.
What does it mean for a job to be disabled?
A disabled job cannot be executed until it is re-enabled. If it’s scheduled to run every 5 minutes, it remains “locked” and won’t trigger. Alternatively, you can disable the schedule.
Where in the GUI can you disable a job?
On the Job Page, hover over the job to reveal the “Action” button on the right. Click it, then select “Disable Execution.”
Here the API endpoints: enable and disable.
And why wouldn’t the verifier job just exit as succeeded once it launches the 2nd job? (or fail if I set a time limit, like fail if more than 48 hours has passed).
That would be ideal, but if you need verification every 5 minutes (or at any interval, as in your initial request), a scheduled job is necessary. Additionally, this job must include logic to check whether the desired action has been triggered in the remote app and confirm if it has already been launched.
In any case, this approach can be improved :)
However, the ruleset strategy makes this easier because it allows you to create custom behaviors based on the values of options and keys (e.g., start a specific step depending on an api call result stored on a key/value data). Only Runbook Automation’s commercial products support Ruleset Strategy.
Best regards.