Set freshness expectations
Who this is for: people who depend on a workflow’s result being ready at a certain time.
Before you start: a workflow you can edit. You change it on the workflow’s YAML tab, or ask your AI assistant.
A schedule says when a workflow should start. A freshness expectation says by when it must have succeeded. If no run succeeded in time, for any reason (the run failed, was skipped, never started, or the other system was down), Liitora tells you.
Add an expectation
Section titled “Add an expectation”Add expect: at the top level of the workflow:
name: Daily sales reportdescription: Every weekday morning, build yesterday's sales report and email it to the sales team.on: schedule: - cron: "0 7 * * 1-5" timezone: Europe/Helsinkiexpect: succeeds_by: "09:00" on: weekdays timezone: Europe/Helsinki skip_on: [fi_public_holidays]steps: # ...This says: on every weekday that is not a Finnish public holiday, a production run must succeed between 00:00 and 09:00 Helsinki time.
The expectation starts being checked when the version is activated.
The keys
Section titled “The keys”| Key | Default | Meaning |
|---|---|---|
succeeds_by |
required | The deadline, HH:MM from 00:00 to 23:59. |
from |
00:00 |
When the window starts, HH:MM. |
on |
daily |
Which days have a deadline: daily, weekdays, weekends, or a list of days such as [mon, wed, fri]. |
timezone |
UTC |
The IANA time zone for the times and days, such as Europe/Helsinki. |
skip_on |
none | Calendars whose days have no deadline: fi_public_holidays, se_public_holidays, weekends, tenant_blackouts. See Use calendars and holidays. |
Day names in a list are mon, tue, wed, thu, fri, sat and sun, in any letter case, each listed once.
How the check works
Section titled “How the check works”- Each matching day has one deadline: that day at
succeeds_by. - The window runs from
fromtosucceeds_byon the same day. Iffromis not beforesucceeds_by, the window starts the day before. For examplefrom: "18:00"andsucceeds_by: "06:00"means “between 18:00 yesterday and 06:00 today”. - The deadline is met by a succeeded production run of this workflow that finished inside the window. Both ends count: for a 09:00 deadline, a run that finished at 09:00:00 counts and one at 09:00:01 does not.
- Test runs and dry runs never count.
- Liitora checks about a minute after each deadline, so runs that finished right before it are counted. After an outage, every missed deadline is still checked.
When a deadline is missed
Section titled “When a deadline is missed”- A
freshness_violationincident opens, and your admins get an email (or the channel your alert rules name). See Set up alerts. - When a later run succeeds, the incident closes and you get a “works again” message.
- A paused or inactive workflow has no expectation, so its deadlines pass without alerts. The same applies while your company’s account is restricted.
More examples
Section titled “More examples”A nightly sync that must be done by 06:00, counting runs from 20:00 the evening before:
expect: succeeds_by: "06:00" from: "20:00" on: daily timezone: Europe/StockholmA report that is only needed on Mondays, Wednesdays and Fridays:
expect: succeeds_by: "12:00" on: [mon, wed, fri] timezone: Europe/Helsinki