Cron.json
Jump to navigation
Jump to search
The cron.json file, is one of the special-purpose files in the event-catalogue. This file is used to specify recurring events to post and their schedules.
File Format[edit | edit source]
The format for the file is
interface CronConfig {
[event: string]: {
expression: string,
timezone?: string,
}
}
Where expression
uses the Cron format and timezone
is a TZ Identifier.
In this example we have two recurring events, one posts a minute
event every minute, another posts a daily
event every day at 2 pm CET:
{
"minute": { "expression": "0 * * ? * * *" },
"daily": { "expression": "0 0 14 ? * * *", "timezone": "CET" }
}
Deploying Recurring Events[edit | edit source]
When the event-catalogue is deployed, new events are automatically scheduled and removed events are cancelled. You can deploy the event-catalogue with the CLI:
mm deploy