Mergent
Search
⌃K
Links

Scheduling Tasks

Mergent supports multiple ways of scheduling Tasks:
  1. 1.
    Tasks that run once can be scheduled directly with the Tasks API using scheduled_for or delay
  2. 2.
    Tasks that run periodically (e.g., a cron or iCal RRULE) can be scheduled using Mergent Schedules.

Tasks that run once

Tasks that need to be run only once at a specified time can be scheduled via the Tasks API in two ways: scheduled_for and delay.

scheduled_for

To schedule a task to run once at a specific time, specify the scheduled_for when creating a Task using the ISO 8601 timestamp format.
For example, setting scheduled_for to 2024-01-01T00:00:00Z will schedule the task to run at midnight of January 1, 2024.
If you're using a Mergent client library (e.g., mergent-js), you can use that language's native date format and we'll convert it to ISO 8601 automatically.

delay

To schedule a task to run once after a delay, specify the delay when creating a Task using the ISO 8601 duration format.
For example, a delay of PT5M will delay the Task for 5 minutes.
If you're using mergent-js, there are more user-friendly ways to configure a delay without dealing with ISO 8601 durations directly. See JavaScript / TypeScript for more information.

Tasks that run periodically

Tasks that need to be run periodically can be scheduled via Mergent Schedules.
Click here to go to our Schedules documentation.