Configure Schedules¶
Set schedules to run orders on a routine basis, assign runtime resources, or add order annotations.
Set or edit a schedule¶
Follow the steps below to configure schedules from the UI. For information on how to configure schedules from the command line, see Common DKCloudCommand Sequences.
Warning
Editing schedules for active orders: edits to timing and resource allocation have no impact on existing, active orders. When editing the timing and runtime settings for a recipe with active orders, the existing orders must be stopped and new orders submitted after the settings have been applied.
- Navigate to the Recipes page and select a recipe from the list.
-
Use one of the following to access a schedule form.
-
Select the Schedules tab.
Click Add Schedule to create a new schedule or click > Edit to change an existing schedule.
-
Click a variation name to open the Variations page. Select the Schedule tab.
Click Add Variation Schedule to create a new schedule or Change Variation Schedule to edit an existing schedule.
-
-
At a minimum, complete or update the * required fields.
- For details on what each field represents, including how to set runtime resources, see Schedule Settings.
- For steps on how to create a schedule without a frequency, see Run-Once Order Schedules.
- For more information about annotations, continue below.
- Select Add notes for changelog , describe the changes, then click Add or Update.
- If you created a new schedule from the Recipes page (step 2, point 1): Apply the schedule to a variation.
- Select the Variations tab.
- Click > Edit next to a variation.
- In the Edit Variation dialog, update the Schedule field.
- Activate the schedule.
Activate a schedule¶
Schedules must be activated in order to take effect. To activate a schedule, run the variation:
- From the Recipes page, click Run Variation next to the variation name.
- From the Variation page, click Run Variation.
Annotations¶
Since order runs in the system execute within Kubernetes pods and runtime containers, users may want to attach metadata as annotations to the Kubernetes components. Annotations serve to extend the default properties of Kubernetes objects at runtime. The metadata is strictly non-identifying information in that it is not used to identify and select objects.
You can attach metadata to the Kubernetes runtime objects using the Annotations for Runtime Components field in the schedule forms.
Note
To add annotations to run-once orders, create a schedule without a frequency and only complete the annotations field.
Syntax¶
When adding annotations in a schedule form, use valid JSON.
If using the File Editor or the command line interface, add annotations to the schedule-setting-list object in
variations.json.
{
[File contents truncated for example]
"schedule-setting-list": {
"default": {
"schedule": "now",
"annotations": {
"annotation1": "value1"
}
}
}
}
Annotation use cases and examples¶
- Allow the platform to assume an AWS IAM (Identity and Access Management) role to interact with AWS services. In this way, a runtime container can access external AWS resources, such as S3, EC2, or Redshift, using the role credentials.
- Increase logging levels for runtime container logs to help with troubleshooting background order run processing.
- Pull Docker container images from multiple image registries within a single variation. Customers may store and manage Docker images
across several registries, such as Docker Hub and Harbor. An
imageregistryannotation could orchestrate this where standard recipe configurations cannot.
Example schedule objects in variations.json¶
Schedules are configured in the UI or CLI and details are recorded in the recipe's variations.json file.
{
"variation-list": {
"variation-test": {
"schedule-setting": "on_demand",
"graph-setting": "graph"
},
"variation-morning-us": {
"schedule-setting": "daily_6_am_schedule",
"graph-setting": "graph"
},
},
"schedule-setting-list": {
"on_demand": {
"schedule": "now"
}
"daily_6_am_schedule": {
"schedule": "0 6 * * *",
"scheduleTimeZone": "America/New_York",
"epsilon": 1800,
"max-ram": 1088,
"max-disk": 10240
}
"annotations": {
"annotation1": "value1"
}
}
}