Goal
Run a Function at regular intervals (cleanup jobs, report generation, health checks) using the Cron module.Steps
1. Enable the Cron module
iii-config.yaml
2. Register the Function
- Node / TypeScript
- Python
- Rust
cron-task.ts
3. Register the Cron trigger
- Node / TypeScript
- Python
- Rust
cron-trigger.ts
expression field uses a 7-field cron format with seconds support (second minute hour day month weekday year).
Common schedules
| Expression | Frequency |
|---|---|
* * * * * * * | Every second |
0 * * * * * * | Every minute |
0 */5 * * * * * | Every 5 minutes |
0 0 * * * * * | Every hour |
0 0 */6 * * * * | Every 6 hours |
0 0 0 * * * * | Daily at midnight |
0 0 9 * * 1 * | Every Monday at 9 AM |