Scheduling Functions
Run a function on a cron cadence with an optional fixed payload.
A schedule runs a function automatically on a recurring cadence. You attach a cron schedule to a function with a 5-field cron expression (evaluated in UTC) and an optional fixed payload; on every tick Daytona invokes the function's current version with that payload. Each firing produces an ordinary invocation you can inspect through the invocation log or by polling GET /invocations/:id. Schedules are ideal for periodic work — nightly ETL, health polls, digest emails — where you want the platform to do the calling on a clock.
Creating a schedule
Create a schedule with the SDK or the REST API. The cron expression has five fields — minute, hour, day-of-month, month, day-of-week — and is interpreted in UTC. The payload is forwarded verbatim to the handler on each fire, exactly like a manual invocation.
The response includes the schedule's id, whether it's enabled, and the computed next_run_at. A schedule with an unparseable cron expression is rejected with 400.
Listing and deleting schedules
A function can have multiple schedules. List them to see each one's cron expression, payload, enabled state, and next and last run times; delete one by id when you no longer need it.
Inspecting scheduled runs
Each fire is an async invocation, so you inspect it the same way you inspect a spawned one — through the function's invocation log, or by polling GET /invocations/:id. Because scheduled invocations run asynchronously, the 256 KiB retrievable-result limit for async results applies: return a reference to any large output rather than the output itself.
Note: Cron schedules always run against the function's current version. Redeploying rolls scheduled runs forward to the new version automatically — there's nothing to re-point.
For the full request and response shapes, see the Functions API reference.