---
title: Schedule jobs with cron expressions
slug: optimizely-connect-platform/docs/schedule-jobs-using-cron-expressions-ocp2
docTags: 
createdAt: 2026-07-23T12:37:04.527Z
---

The following are different ways to trigger OCP jobs:

- Trigger the job by another part of the app, like a form.
- Use a cron expression to run the job periodically on a given schedule.
- Use the following opti-cli command:

```shell
opti jobs trigger <appId> <jobName> <trackerId> 
```

## Schedule jobs with cron expressions

Use the `cron` property in the app manifest file (`app.yml`) to schedule the regular execution of a job. The property uses quartz cron format.

Examples

| Expression        | Description                           |
| ----------------- | ------------------------------------- |
| - - *?* \*        | Every second.                         |
| 0 \_ *?* \_       | Every minute.                         |
| 0 */2* ? \* \*    | Every even minute.                    |
| 0 */2* ? \* \*    | Every two minutes.                    |
| 0 */5* ? \* \*    | Every five minutes.                   |
| 0 */10* ? \* \*   | Every 10 minutes.                     |
| 0 */15* ? \* \*   | Every 15 minutes.                     |
| 0 */30* ? \* \*   | Every 30 minutes.                     |
| 0 15,30,45 *?* \* | Every hour at minutes 15, 30, and 45. |
| 0 0 */2 ?* \*     | Every hour.                           |
| 0 0 0/2 ? \* \*   | Every even hour.                      |
| 0 0 */12 ?* \*    | Every 12 hours.                       |
| 0 0 12 \* \* ?    | Every day at noon - 12pm.             |
| 0 0 12 ? \*       | SUN	Every Sunday at noon.             |

To build your own cron expression, you can use a [free formatter](https://www.freeformatter.com/cron-expression-generator-quartz.html).

The following is an example of a YAML configuration:

```yaml
jobs:
  nightly_import:
    entry_point: NightlyImport
    # runs at midnight every night
    cron: 0 0 0 ? * *
    description: Performs a nightly import for data that is not provided or needed in real time
```
