Dormeto

Docs

Recurrences

A window can repeat on more than chosen weekdays, within a range of dates.

4 min read

Exception dates, the maximum nap, pauses, wake modes and clock changes apply to each occurrence.

Patterns

A window's repeat replaces its days.

NameValuesDefaultEffect
patterndaily, weekly, monthly or cronrequiredHow the window repeats.
interval1 to 99, not with cron; above 1, from is required1Every N days, weeks (Monday to Sunday) or months, counted from from.
daysmon to sun, each oncerequired with weeklyA weekly window's weekdays.
day1 to 31—A monthly window's day, else it falls on that month's last day.
nth, weekday1 to 4, or -1 for the last; mon to sun—Instead of day: 1, mon is the first Monday.
cron, minutesan expression of at most 200 characters; 5 to 10,080 min (7 days), a multiple of 5required with cronCron expressions.
  • Yearly is monthly with "interval": 12, from giving its month.
  • Do not repeat is daily, from and until on one date, shown "Once on 4 Jan 2027".
  1. Every 3 days

    daily, interval 3, from 4 until 25 January.

  2. Every 2 weeks, Monday and Thursday

    weekly, interval 2, from 4 January: the weeks of 4 and 18 January.

  3. Cron 30 8 * * 1-5

    Monday to Friday at 08:30, from 11 until 22 January.

  4. Every 3 months, on the 15th

    monthly, interval 3, day 15, from 1 January: January, April, July and October.

  5. The first Monday

    monthly, nth 1, weekday mon, until 30 June.

  6. On the 31st

    monthly, day 31: a shorter month gets its last day, such as 28 February or 30 April.

Two patterns, then a one-off window:

{
  "timeZone": "Europe/Paris",
  "windows": [
    {
      "kind": "nap",
      "start": "20:00",
      "end": "07:00",
      "repeat": {
        "pattern": "weekly",
        "interval": 2,
        "days": ["mon", "thu"]
      },
      "from": "2027-01-04",
      "until": "2027-06-30",
      "wake": "header"
    },
    {
      "kind": "awake",
      "start": "08:00",
      "end": "18:00",
      "repeat": {
        "pattern": "monthly",
        "interval": 3,
        "nth": 1,
        "weekday": "mon"
      },
      "from": "2027-01-01"
    }
  ]
}
{
  "timeZone": "Europe/Paris",
  "windows": [
    {
      "kind": "nap",
      "start": "09:00",
      "end": "17:00",
      "repeat": { "pattern": "daily" },
      "from": "2027-01-04",
      "until": "2027-01-04"
    }
  ]
}

Cron expressions

A cron expression instead, from 08:30 on weekdays for 630 minutes:

{
  "timeZone": "Europe/Paris",
  "windows": [
    {
      "kind": "awake",
      "repeat": {
        "pattern": "cron",
        "cron": "30 8 * * 1-5",
        "minutes": 630
      }
    }
  ]
}
  • cron replaces start and end too: each occurrence lasts minutes, in wall time.
  • An expression has crontab's five fields: minute hour day-of-month month day-of-week.
  • A field is *, a number, a range a-b, a step */s or a-b/s, or their comma list.
  • Months also take JAN to DEC, weekdays SUN to SAT, in any case; 0 and 7 are Sunday.
  • ? means *, as a whole day field only.
  • When both day fields are restricted, neither exactly * nor ?, either matches, as in crontab.
  • FRI-SUN is Friday to Sunday; an oversized step such as */100 gives the first value.

A window starting every few minutes starts again each time: Wake now and Nap now last until then. Such an awake window blocks naps: the router accepts it, the dashboard warns.

MessageCauseFix
windows[0].repeat.cron: minutes must be multiples of 5, as schedule times are: * is every minute, */5 every five* in the minute field: every minute must be a multiple of 5.Use minutes such as */5 or 0,30.
windows[0].repeat.cron: five fields: minute hour day-of-month month day-of-weekSix fields, cron(...), L, W or #: EventBridge's, whose weekday 1 is Sunday.Write crontab's five fields.
windows[0].repeat.cron: a day field starting with * goes alone: cron versions read */2 with the other day field differently, so give a list or a rangeA day field such as */2 beside the other one.Give that day field as a list or a range.
windows[0].repeat.cron: the minute field takes *, a number from 0 to 59, a range a-b, a step */s or a-b/s, or a comma list of those: 5/55/5, or a reversed range such as 5-0.Write */5, or a range from low to high.
windows[0].repeat.cron: never matches: no such date in that monthSuch as 0 8 31 2 *; 0 8 29 2 * matches in leap years.Choose a date that month has.

The range

  • from and until are local dates YYYY-MM-DD, in the schedule's zone, each optional; both days are included.
  • No occurrence starts before from or after until; one started on until runs to its end.
  • Without until, the window has no end date; until before from is refused.
  • End times stay required; "End after N occurrences" does not exist.

In the dashboard, the API and the CLI

  • The window editor's Repeats: Weekly, the default, Do not repeat, Daily, Monthly, Yearly or Cron expression.
  • Its range: No end date, the default, or a date.
  • The next 5 occurrences show, in the schedule's zone; an unreadable cron expression keeps Save off.
  • The API, dormeto aws schedule set --file and dormeto gcp schedule set --file take the same JSON.
  • schedule add takes a recurrence as --repeat and its flags (schedule).
  • schedule show says a recurrence in words (schedule).