Cron jobs
Page summary:Cron jobs schedule custom functions at specific times via
node-schedule, activated through server config and optional task files.
Prerequisites
The cron.enabled configuration option should be set to true in the ./config/server.js (or ./config/server.ts for TypeScript projects) file.
cron allows scheduling arbitrary functions for execution at specific dates, with optional recurrence rules. These functions are named cron jobs. cron only uses a single timer at any given time, rather than reevaluating upcoming jobs every second/minute.
This feature is powered by the `node-schedule` package.
The cron format consists of:
* * * * * *
┬ ┬ ┬ ┬ ┬ ┬
│ │ │ │ │ |
│ │ │ │ │ └ day of week (0 - 7) (0 or 7 is Sun)
│ │ │ │ └───── month (1 - 12)
│ │ │ └────────── day of month (1 - 31)
│ │ └─────────────── hour (0 - 23)