schedule_simple
Trigger a repaired outcome when a job should be run.
⚙️ Compatible targets: Linux
Parameters
Name | Documentation |
---|---|
job_id | A string to identify this job. This parameter is required. |
agent_periodicity | Agent run interval (in minutes). This parameter is required. |
max_execution_delay_minutes | On how many minutes you want to spread the job. This parameter is required. |
max_execution_delay_hours | On how many hours you want to spread the job. This parameter is required. |
start_on_minutes | At which minute should be the first run. This parameter is required. |
start_on_hours | At which hour should be the first run. This parameter is required. |
start_on_day_of_week | At which day of week should be the first run. This parameter is required. |
periodicity_minutes | Desired job run interval (in minutes). This parameter is required. |
periodicity_hours | Desired job run interval (in hours). This parameter is required. |
periodicity_days | Desired job run interval (in days). This parameter is required. |
mode | "nodups": avoid duplicate runs in the same period / "catchup": avoid duplicates and one or more run have been missed, run once before next period / "stateless": no check is done on past runs. This parameter is required. |
Outcome conditions
You need to replace ${job_id}
with its actual canonified value.
- ✅ Ok:
schedule_simple_${job_id}_ok
- ☑️ Already compliant:
schedule_simple_${job_id}_kept
- 🟨 Repaired:
schedule_simple_${job_id}_repaired
- ☑️ Already compliant:
- ❌ Error:
schedule_simple_${job_id}_error
Example
method: schedule_simple
params:
max_execution_delay_hours: VALUE
start_on_minutes: VALUE
job_id: VALUE
periodicity_days: VALUE
agent_periodicity: VALUE
mode: VALUE
max_execution_delay_minutes: VALUE
start_on_day_of_week: VALUE
periodicity_minutes: VALUE
start_on_hours: VALUE
periodicity_hours: VALUE
Documentation
This method compute the expected time for running the job, based on the parameters and splayed uing system ids, and define a conditions based on this computation:
schedule_simple_${job_id}_kept
if the job should not be run nowschedule_simple_${job_id}_repaired
if the job should be runschedule_simple_${job_id}_error
if their is an inconsistency in the method parameters
Example
If you want to run a job, at every hour and half-hour (0:00 and 0:30), with no spread across system, with an agent running with default schedule of 5 minutes, and making sure that the job is run (if the agent couldn't run it, then at the next agent execution the job should be run), you will call the method with the following parameters:
schedule_simple("job_schedule_id", "5", "0", "0", "0", "0", "0", "30", "0", "0", "catchup")
During each run right after o'clock and half-hour, this method will define the condition
schedule_simple_job_schedule_id_repaired, that you can use as a condition for a generic
method command_execution