Developer docs / AI Fabric SDK / Primitives

Cron schedules

Declare a UTC cron schedule on a function with bladekit.Cron and trigger it automatically once the app is deployed.

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.

Python
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

Terminal
blade deploy reports.py

bladekit.Cron

Signature
bladekit.Cron(
    expression: str,
    *,
    overlap_policy: str = "skip",
)

expression str

A 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_policy strDefault: "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

Signature
@app.function(
    ...,
    schedule: Cron | None = None,
)

schedule CronDefault: None

A bladekit.Cron(...) instance for cron-scheduled execution. Only takes effect in a deployed app — blade run records 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.

CommandDescription
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.
Terminal
blade cron list app_01hxyz

Terminal
blade cron history cron_01hxyz --limit 50

Terminal
blade cron trigger cron_01hxyz

Reference from the Blade console · Updated .

Contact the team

Loading the form…