---
title: Configure schedules in static configuration
description: When you create or update your schedule definition by using a PUT request against the /openidm/config/schedule/ endpoint, this endpoint creates the schedule as a static configuration and includes it in promotions.
component: pingoneaic
page_id: pingoneaic:idm-schedules:configure-static-schedules
canonical_url: https://docs.pingidentity.com/pingoneaic/idm-schedules/configure-static-schedules.html
section_ids:
  create-esv-variables: Create ESV variables
  create-schedules-esvs: Create schedules using ESV variables
---

# Configure schedules in static configuration

|   |                                                                                                                          |
| - | ------------------------------------------------------------------------------------------------------------------------ |
|   | You can [schedule jobs](../identities/manage-scheduled-jobs.html) directly in the Advanced Identity Cloud admin console. |

When you create or update your schedule definition by using a `PUT` request against the `/openidm/config/schedule/` endpoint, this endpoint creates the schedule as a *static configuration* and includes it in promotions.

## Create ESV variables

When you configure schedules in a static configuration, you can use environment secrets and variables ([ESVs](../tenants/esvs.html)) in schedules to allow different settings between environments.

Example ESVs include:

* `esv-schedule-enabled`

  This ESV controls whether the schedule is enabled and should be set to `true` or `false` in each environment as needed.

* `esv-sync-schedule`

  This ESV controls when the schedule is run for cron triggers. For example, you could set the ESV to `0 0 10 ? * WED` to run the schedule every Wednesday at 10 AM in one environment and then set the ESV to `0 0 17 * * ?` to run the schedule every day at 5 PM in another environment.

  |   |                                                                                                                                                                                                                       |
  | - | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  |   | To avoid a known issue where day `1` is Monday rather than Sunday, use three letters to specify the day instead. Learn more in [Schedule configuration properties](configure-schedules.html#sched-config-properties). |

Learn more about creating ESV variables and applying updates in the [Introduction to ESVs](../tenants/esvs.html) and in [Set up configuration placeholders to reference an ESV.](../tenants/configuration-placeholders.html)

## Create schedules using ESV variables

You can create the two example ESVs (&{esv.schedule.enabled} and &{esv.sync.schedule}) described in the [Create ESV variables](#create-esv-variables) section to control whether a schedule is enabled and when a schedule will run.

To create your schedule or update an existing schedule using these example variables, ensure you use a `PUT` request against the `/openidm/config/schedule/` endpoint.

For example:

```
curl \
--header "Authorization: Bearer <access-token>" \ (1)
--header "content-type: application/json" \
--header "Accept-API-Version: resource=1.0" \
--header "If-None-Match: *" \
--request PUT "https://<tenant-env-fqdn>/openidm/config/schedule/<schedule-name>" \ (2) (3)
--data '{
    "isCron": true,
    "enabled": {
      "$bool": "&{esv.schedule.enabled}" (4)
  },
    "persisted": true,
    "type": "cron",
    "misfirePolicy": "fireAndProceed",
    "invokeService": "sync",
    "invokeLogLevel": "info",
    "invokeContext": {
        "action": "reconcile",
        "mapping": "systemLdapAccounts_managedAlpha_user"
    },
    "concurrentExecution": false,
    "schedule": "&{esv.sync.schedule}" (5)
}'
```

|       |                                                                                                                                                                                                                                                                                                                                                |
| ----- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **1** | The access token you obtained when you authenticated to the Advanced Identity Cloud REST API. The access token is set as a bearer token in the `Authorization` HTTP header for each API request. Learn more in [Authenticate to Advanced Identity Cloud with access token](../developer-docs/authenticate-to-rest-api-with-access-token.html). |
| **2** | Your Advanced Identity Cloud tenant name.                                                                                                                                                                                                                                                                                                      |
| **3** | The name of your schedule.                                                                                                                                                                                                                                                                                                                     |
| **4** | Placeholder for the ESV you created.                                                                                                                                                                                                                                                                                                           |
| **5** | Placeholder for the ESV you created.                                                                                                                                                                                                                                                                                                           |

After you've created or updated your schedule through REST, you should restart Advanced Identity Cloud services to substitute the placeholders with the corresponding ESV values. Learn more about how to [Restart Advanced Identity Cloud services](../tenants/configuration-placeholders.html#restart-identity-cloud-services).

|   |                                                                                                                                                                                                                                                                                                                                                                                                                   |
| - | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|   | You can view your schedules in the Advanced Identity Cloud user interface (UI), but you should only update them using the ESVs you created. Alternatively, [manage schedules using REST](configure-dynamic-schedules.html#schedules-over-rest) to keep your schedules using the ESV placeholders. If you make changes to the schedule in the UI, the ESV placeholders will be overwritten with the actual values. |
