Scheduling Tasks
Mergent supports multiple ways of scheduling Tasks:
- 1.
- 2.
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
.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.
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 need to be run periodically can be scheduled via Mergent Schedules.
Last modified 6mo ago