Scheduling Jobs and Pipelines
Scheduling
The scheduler takes cron expressions to create schedules for when to run both sync and pipeline transactions.
Scheduling Jobs
Creating a New Schedule
To create a new schedule for a job you can use the scheduler /sync/config endpoint.
To create a schedule for a job, you will need the job ID of the job you want to schedule and the cron expression for the schedule. This example creates a schedule that runs the job every minute.
The response will provide the id
of the newly created schedule config. You can save this ID to later update the config.
This endpoint can be used to create multiple schedules for the job.
Updating an Existing Schedule
To update an existing schedule you can use the scheduler's /sync/config/{{config-id}} endpoint.
To update an existing schedule you will need the schedule config ID, the job ID, and the cron expression for the schedule. This example updates the schedule to run the job every 5 minutes.
Scheduling Pipelines
Creating a New Schedule
To create a new schedule for a pipeline you can use the scheduler /pipeline/config endpoint.
To create a schedule for a pipeline, you will need the pipeline ID of the pipeline you want to schedule and the cron expression for the schedule. This example creates a schedule that runs the pipeline every minute.
This endpoint can be used to create multiple schedules for the pipeline.
Updating an Existing Schedule
To update an existing schedule you can use the scheduler's /pipeline/config/{{configID}} endpoint.
To update an existing schedule you will need the schedule config ID, the pipeline ID, and the cron expression for the schedule. This example updates the schedule to run the pipeline every 5 minutes.
Getting Schedules
You can get schedules either by ID or all the schedules at one time.
The scheduler's /config endpoint can be used to retrieve all schedules created.
This will show all the schedules created both for job and pipelines.
The scheduler's /config/{{configID}} endpoint can be used to retrieve a single schedule.
This will show the single schedule for the passed in id.
Removing a Schedule
If you no longer want a schedule, you can remove it by using the /config/{{configID}} endpoint.
This will remove the schedule so that it will no longer run.
Last updated