scheduler({ cron, handler }) factory and auto-discovered from any resource’s crons/ folder — so a plugin adds scheduled work exactly the way it adds an endpoint.
Define a cron job
@/db, services, and everything else.
Where cron files live
Cron files are owned by the resource they belong to:**/crons/*.ts default export is collected when the scheduler process starts and registered with node-schedule — the same filesystem-driven wiring as endpoints. There is no central list to edit.
Add a cron from a plugin
Because discovery is by file path, a plugin just ships acrons/ file in one of its resources:
Run the scheduler
pnpm start runs the scheduler alongside the API and web app. In production it runs as its own process from the API image (apps/api/Dockerfile.scheduler), started after the Migrator so it always works against an up-to-date schema — see deployment.
Cron format
Thecron field is a standard five-field cron expression:

| Expression | Runs |
|---|---|
* * * * * | every minute |
*/15 * * * * | every 15 minutes |
0 * * * * | every hour |
0 0 * * * | every day at midnight |
0 9 * * 1 | every Monday at 09:00 |
