Schedules and Intervals
Use a schedule for calendar time and an interval for a fixed-rate elapsed grid.
Calendar schedules
<schedule id="dailyReport" cron="0 8 * * *" timezone="Europe/Berlin" on-missed="run-once" />Cron uses five fields: minute, hour, day of month, month, and day of week. WOML supports wildcards, lists, ranges, and steps. Timezone defaults to UTC and otherwise uses a canonical IANA name.
Fixed intervals
<interval id="refreshCache" every="5m" on-missed="skip" />every accepts a duration from 1 second through 30 days. The schedule remains anchored, so a slow run does not shift future planned instants.
Missed occurrences
on-missed="skip" ignores missed instants. run-once admits one catch-up occurrence. Both trigger types provide { scheduledAt, triggeredAt } timestamps in context.payload.
Choose calendar time or elapsed time
Use a schedule when humans describe the requirement with a calendar: “every weekday at 08:00 in Berlin.” Use an interval when the requirement is elapsed repetition: “every five minutes from the runtime's anchored grid.”
A schedule is timezone-aware. An interval is not a replacement for a calendar promise because daylight-saving changes and wall-clock meaning are not part of its contract.
Build a scheduled report
<woml>
<workflow id="daily-report" name="Daily report" version="1.0.0">
<triggers>
<schedule
id="morningReport"
cron="0 8 * * 1-5"
timezone="Europe/Berlin"
on-missed="run-once"
/>
</triggers>
<steps>
<step id="report" name="Build report">
<script>
return {
scheduledAt: context.payload.scheduledAt,
startedAt: context.payload.triggeredAt
};
</script>
</step>
</steps>
</workflow>
</woml>WOML cron uses five numeric fields: minute, hour, day of month, month, and day of week. It supports wildcards, lists, inclusive ranges, and steps. It does not support seconds, names, macros, wrapping ranges, or Quartz-only tokens.
Build a fixed interval
<interval id="refreshCache" every="5m" on-missed="skip" />Intervals accept durations from 1s through 30d. The planned schedule remains anchored, so a slow run does not permanently move every future occurrence later.
Understand missed runs
If the runtime is stopped during planned occurrences, skip ignores those missed instants. run-once admits one catch-up run after recovery rather than replaying every missed occurrence.
Choose deliberately. A monitoring refresh often uses skip; a once-daily business report may need run-once. Neither policy guarantees the external effects inside the workflow are safe to repeat.
Test time-based workflows
During development, temporarily add a manual trigger or use a short interval in a non-production copy. Do not change a production cron merely to test business logic. Keep the workflow steps trigger-independent by reading normalized payload fields only when they are relevant.