コンテンツにスキップ
#0800
Exec

The cron line lives above the handler

The weekly usage report your SaaS mails every customer is one script. At the top of the file sits a @schedule line with a cron expression; below it, the handler that builds and sends the report. The scheduler scans the scripts directory, registers every @schedule it finds, fires them in UTC, and writes each fire to a log. GET /api/v1/exec/schedules/list shows what's registered, when each fires next, and how the last run went. Edit the line, reload the registrations, done.

On function platforms, the schedule lives in a second service: its own console, its own config, its own slow drift away from the code it triggers.

The schedule ships in the same commit as the function.