Schedules
Run PandaStack Functions on cron schedules.
What are Schedules?
Schedules attach a cron expression to a function and trigger it automatically.
Every scheduled run executes the target function in a fresh isolated microVM, just like a manual invocation.
Create a schedule
First deploy a function, then attach a schedule to it:
from pandastack import Client
client = Client()
fn = client.functions.deploy(name="daily-report", runtime="python", path="handler.py")
schedule = client.schedules.create("daily-report", fn["id"], "0 9 * * *")
print(schedule["id"])import { Client } from "@pandastack/sdk";
import { readFileSync } from "node:fs";
const client = new Client();
const fn = await client.functions.create("daily-report", "python", readFileSync("handler.py"), {
entrypoint: "handler.py",
});
const schedule = await client.schedules.create("daily-report", fn.id, "0 9 * * *");
console.log(schedule.id);pandastack function deploy handler.py --name daily-report --runtime python
pandastack schedule create --name daily-report --fn <function-id> --cron "0 9 * * *"curl -X POST https://api.pandastack.ai/v1/schedules \
-H "Authorization: Bearer $PANDASTACK_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "daily-report", "function_id": "<function-id>", "cron": "0 9 * * *"}'The schedule stores:
function_idnamecronpausedlast_run_atcreated_atupdated_at
Cron syntax
Schedules use standard 5-field cron expressions:
┌ minute (0 - 59)
│ ┌ hour (0 - 23)
│ │ ┌ day of month (1 - 31)
│ │ │ ┌ month (1 - 12)
│ │ │ │ ┌ day of week (0 - 6)
│ │ │ │ │
* * * * *Examples:
*/5 * * * *— every 5 minutes0 * * * *— every hour0 9 * * *— every day at 09:00 UTC0 0 * * 1— every Monday at midnight UTC
Pause and resume
client.schedules.update("<schedule-id>", paused=True) # pause
client.schedules.update("<schedule-id>", paused=False) # resumeawait client.schedules.update("<schedule-id>", { paused: true }); // pause
await client.schedules.update("<schedule-id>", { paused: false }); // resumepandastack schedule pause <schedule-id>
pandastack schedule resume <schedule-id># Pause
curl -X PATCH https://api.pandastack.ai/v1/schedules/<schedule-id> \
-H "Authorization: Bearer $PANDASTACK_API_KEY" \
-H "Content-Type: application/json" \
-d '{"paused": true}'
# Resume
curl -X PATCH https://api.pandastack.ai/v1/schedules/<schedule-id> \
-H "Authorization: Bearer $PANDASTACK_API_KEY" \
-H "Content-Type: application/json" \
-d '{"paused": false}'Pausing keeps the schedule definition but stops future automatic invocations until you resume it.
Trigger manually
run = client.schedules.trigger("<schedule-id>")
print(client.schedules.runs("<schedule-id>"))const run = await client.schedules.trigger("<schedule-id>");
console.log(await client.schedules.runs("<schedule-id>"));pandastack schedule trigger <schedule-id>
pandastack schedule runs <schedule-id>curl -X POST https://api.pandastack.ai/v1/schedules/<schedule-id>/trigger \
-H "Authorization: Bearer $PANDASTACK_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'
curl https://api.pandastack.ai/v1/schedules/<schedule-id>/runs \
-H "Authorization: Bearer $PANDASTACK_API_KEY"Manual triggers are useful for testing a cron-backed workflow immediately without waiting for the next scheduled window.
Update a schedule
client.schedules.update("<schedule-id>", cron="0 */6 * * *")await client.schedules.update("<schedule-id>", { cron: "0 */6 * * *" });pandastack schedule update <schedule-id> --cron "0 */6 * * *"curl -X PATCH https://api.pandastack.ai/v1/schedules/<schedule-id> \
-H "Authorization: Bearer $PANDASTACK_API_KEY" \
-H "Content-Type: application/json" \
-d '{"cron": "0 */6 * * *"}'Use updates when you need to change cadence without redeploying the underlying function.
Functions overview
Deploy Python or Node.js functions into isolated PandaStack microVMs — multi-file bundles, GCS storage, ClickHouse metrics, better than Lambda.
Code Execution for AI Agents: Any Framework
Wire code execution for AI agents into any framework — LangGraph, CrewAI, the Vercel AI SDK, MCP — with one Firecracker sandbox pattern.