Build a scheduled worker
On this page
Create a workflow that can process a small, repeatable unit of work, then attach a schedule. Keep the worker independent of a browser session and safe to run more than once.
Define the job contract#
Choose the target operation, environment, frequency, and input. For a read-only sync preview, an input might be:
{
"batchSize": 20,
"mode": "preview"
}These fields belong to your worker's contract; the platform does not automatically implement preview behavior. Your workflow must validate and honor them.
Build and test the worker#
Create the action and read the input directly in Python with job = ${body}. Validate the batch size, fetch a bounded set of records, and return a useful summary of what was processed.
For writes, use stable record identifiers and track completion so a retry does not duplicate the effect. Store durable progress in a database, not in the session keys from an earlier run.
Test the worker manually with fixture inputs before enabling recurring execution. Inspect its action and outbound request logs.
Create the schedule#
Open Workflows → Schedules, choose the target action and environment, and configure the body, timing, and state. Daily, weekly, and monthly schedules use a UTC start time; verify the intended local-time equivalent.
The target workflow does not need a Schedule node for this static job. Use a Schedule node only when another workflow must create a job using runtime data.
Observe the first runs#
Confirm that the schedule is active, a run was queued, and the expected action executed. Check duration, processed counts, and any provider limits. Look for overlap if a run can take longer than its interval.
Change or pause the job#
Review the schedule state before modifying timing or inputs. Disable future runs while making a change that cannot safely overlap with current work, and inspect whether a run is already in progress. Verify the new configuration with a controlled execution before restoring the recurring schedule.
Need to investigate a problem? Start with troubleshooting
