Cron schedules
bladekit.Cron declares a cron schedule on a function. Pass it as the schedule= argument to @app.function(...); the control plane's cron scheduler then triggers that function automatically according to the expression, without any caller invoking .remote(). Schedules only take effect for a deployed app — running the same code with blade run stores the schedule in the function's metadata but never fires it.
import bladekit
app = bladekit.app("reports")
@app.function(gpu="RTX-A4500", schedule=bladekit.Cron("0 3 * * *"))
def nightly_job():
... # runs every day at 03:00 UTC once deployed
blade deploy reports.pybladekit.Cron
bladekit.Cron(
expression: str,
*,
overlap_policy: str = "skip",
)expressionstrA 5-field UTC cron expression:
minute hour day-of-month month day-of-week, e.g."0 3 * * *"(daily at 03:00 UTC) or"*/5 * * * *"(every 5 minutes).overlap_policystrDefault:"skip"What to do if the previous execution is still running when the next trigger is due.
"skip"skips the new trigger;"allow"starts it alongside the running one.
schedule= on @app.function
@app.function(
...,
schedule: Cron | None = None,
)scheduleCronDefault:NoneA
bladekit.Cron(...)instance for cron-scheduled execution. Only takes effect in a deployed app —blade runrecords it in the function's metadata but does not trigger it.
On blade deploy, every function with a schedule contributes one manifest entry: its name, cron_expr, overlap_policy, a reference to the function, and its resource spec (gpu_type, gpu_count, cpu_millicores, memory_mb, timeout_seconds), plus priority/namespace when set. The server (handleCreateDeployment) inserts a cron_schedules row per entry — that row, not your local process, is what fires the function going forward.
CLI
Once an app is deployed, use blade cron to inspect and manually trigger its registered schedules.
| Command | Description |
|---|---|
blade cron list <app_id> | List the cron schedules registered for an app: cron id, expression, and current state. |
blade cron history <cron_id> [--limit N] | Show recent executions for one schedule — execution id, scheduled time, state. --limit defaults to 20. |
blade cron trigger <cron_id> | Fire a one-off execution of the schedule immediately, outside its regular cadence, and print the resulting execution id. |
blade cron list app_01hxyzblade cron history cron_01hxyz --limit 50blade cron trigger cron_01hxyzReference from the Blade console · Updated .