schedule_simple

Trigger a repaired outcome when a job should be run.

⚙️ Compatible targets: Linux

Parameters

NameDocumentation
job_idA string to identify this job.

This parameter is required.
agent_periodicityAgent run interval (in minutes).

This parameter is required.
max_execution_delay_minutesOn how many minutes you want to spread the job.

This parameter is required.
max_execution_delay_hoursOn how many hours you want to spread the job.

This parameter is required.
start_on_minutesAt which minute should be the first run.

This parameter is required.
start_on_hoursAt which hour should be the first run.

This parameter is required.
start_on_day_of_weekAt which day of week should be the first run.

This parameter is required.
periodicity_minutesDesired job run interval (in minutes).

This parameter is required.
periodicity_hoursDesired job run interval (in hours).

This parameter is required.
periodicity_daysDesired 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
  • ❌ 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 now
  • schedule_simple_${job_id}_repaired if the job should be run
  • schedule_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