> For the complete documentation index, see [llms.txt](https://docs.fortifiedid.se/scheduler/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fortifiedid.se/scheduler/scheduler.md).

# Scheduler

Schedule platform jobs with Quartz cron expressions.

The Scheduler module creates scheduled jobs. Its module alias is `Scheduler`.

## Configuration

{% tabs %}
{% tab title="Properties" %}

<table><thead><tr><th>Name</th><th>Description</th><th>Default</th><th data-type="checkbox">Mandatory</th></tr></thead><tbody><tr><td><code>jobs</code></td><td>List of job definitions.</td><td><code>[]</code></td><td>false</td></tr></tbody></table>
{% endtab %}

{% tab title="Example" %}

```json
{
  "name": "Scheduler",
  "enabled": true,
  "config": {
    "jobs": [
      {
        "id": "job01",
        "type": "Pipes",
        "schedule": "0 0 9 ? * MON-FRI",
        "params": {
          "pipe": "pipe01",
          "params": {
            "param01": "value01",
            "param02": "value02"
          }
        }
      }
    ]
  }
}
```

{% endtab %}
{% endtabs %}

### Job definitions

<table><thead><tr><th>Name</th><th>Description</th><th>Default</th><th data-type="checkbox">Mandatory</th></tr></thead><tbody><tr><td><code>id</code></td><td>Unique job identifier.</td><td></td><td>true</td></tr><tr><td><code>type</code></td><td>Registered action type. The built-in default is <code>NoOp</code>.</td><td><code>"NoOp"</code></td><td>false</td></tr><tr><td><code>schedule</code></td><td>Quartz cron expression or one of the schedule constants. An empty value creates the job without a recurring trigger.</td><td></td><td>true</td></tr><tr><td><code>params</code></td><td>JSON object passed to the action.</td><td><code>{}</code></td><td>false</td></tr><tr><td><code>run_on_start</code></td><td>Trigger a one-off execution when the module starts.</td><td><code>false</code></td><td>false</td></tr><tr><td><code>run_on_start_delay_secs</code></td><td>Delay before the startup execution.</td><td><code>30</code></td><td>false</td></tr></tbody></table>

{% hint style="info" %}
Although `schedule` is required by the configuration schema, an empty string is accepted and means that no recurring trigger is created. `run_on_start` can still trigger the job once.
{% endhint %}

#### Cron expressions

Schedules use six or seven Quartz cron fields: seconds, minutes, hours, day of month, month, day of week and optional year. Use `?` for the day-of-month or day-of-week field that is not specified.

#### Schedule constants

| Constant               | Value                |
| ---------------------- | -------------------- |
| `EVERYDAY_AT_MIDNIGHT` | `"0 0 0 ? * * *"`    |
| `EVERY_HOUR`           | `"0 0 * ? * * *"`    |
| `EVERY_30_MINUTES`     | `"0 */30 * ? * * *"` |
| `EVERY_5_MINUTES`      | `"0 */5 * ? * * *"`  |

The built-in job types are [Pipes](/scheduler/scheduler/job-types/pipes.md), [Http](/scheduler/scheduler/job-types/http.md) and [Exec](/scheduler/scheduler/job-types/exec.md). See the [examples](/scheduler/scheduler/examples.md) for additional cron expressions.
