Skip to main content
A schedule fits recurring work such as a nightly report or an hourly cleanup. Each scheduled run is a task with its own result and logs.

Define a schedule

This function counts files in a volume every day at 03:00 UTC. Save it as daily_report.py:

Trigger it

Deploying the function registers its schedule:
One run right now, without waiting for the schedule:
The first run creates the declared volume or reuses an existing one. While the volume is empty, the function returns {"files": 0}. Upload files to report-inputs and the next run counts them. Scheduled runs appear in the dashboard and in uv run lazycloud task list --app daily_report.

Choose a schedule

All schedules use UTC. Other aliases are @daily, @midnight, @weekly, @monthly, @yearly, and @annually. Intervals accept up to 59 minutes, 23 hours, or 31 days. Deploy rejects an invalid expression.

Schedule options

Scheduled runs use the function’s timeout and retry settings. A run that overlaps the previous one queues behind it unless the function has concurrency or an autoscaler that lets them run side by side. Scheduled functions default to keep_warm=0, so the container stops as soon as a run finishes. See Warm containers.

Change or stop the schedule

Editing cron and deploying again replaces the schedule. Removing cron and redeploying keeps the function callable without automatic runs. To stop it now:
uv run lazycloud deployment delete count-files removes it entirely. The report-inputs volume and its files stay until you delete the volume.

Shared settings

A schedule is a function, so the function options, Images, Resources and options, and Scaling and concurrency all apply.