Schedule workflows, agents, and functions with calendars and cron jobs.
const runId = await client.scheduleWorkflow({
workflowName: "exampleWorkflow",
workflowId: "unique-id",
input: { key: "value" },
schedule: {
calendars: [{ dayOfWeek: "0", hour: 10 }],
},
});
const runId = await client.scheduleWorkflow({
workflowName: "exampleWorkflow",
workflowId: "unique-id",
input: { key: "value" },
schedule: {
intervals: [{ every: "1h" }],
},
});
const runId = await client.scheduleWorkflow({
workflowName: "exampleWorkflow",
workflowId: "unique-id",
input: { key: "value" },
schedule: { cron: "0 10 * * *" },
});
Was this page helpful?