Skip to main content
Some work repeats at fixed times: a report every Monday, a cleanup every night, a sync every hour. Give the workflow a schedule, and Nelkap starts a run each time it comes due. Nothing needs to run in your app in between.

Add a schedule

Set cron when you register the workflow:
This workflow starts a run every Monday at 9:00 UTC.

Write a schedule

A schedule has five fields, separated by spaces: In each field, * means every value, 1-5 a range, 1,15 a list, and */15 every fifteenth value. Months and days of the week can also be written as names, like JAN or MON-FRI. Times are in UTC.

What a scheduled run receives

A scheduled run has no payload, so the workflow takes no argument. When the work depends on the time, read it in a step, so every call of the run gets the same value:

When runs start

  • After you add a schedule, the first run starts at the next time it matches, never right away.
  • Nelkap checks schedules every minute, so a run starts within a minute of its time.
  • If runs couldn’t start for a while, the times missed meanwhile give a single run, not one per missed time.
  • A changed schedule applies as soon as your app registers it. The next run follows the new schedule. On a serverless host, your app registers its list on its first request after a deploy. See Register your workflows on every start.
  • Removing the schedule, or the workflow, stops the runs.
Scheduled runs go through the same concurrency limits as any other. If the previous run is still going and must finish first, give the workflow concurrency: 1.

Run it now

To test a scheduled workflow without waiting for its time, start a run from your code with run. It runs the same workflow, with no payload. For a complete scheduled workflow, see the weekly report example.