# Schedules

A schedule generates checklists on its own, so nobody has to remember to press
**Generate checklist**.

Find them under **Schedules** in the sidebar.

## The two kinds

A schedule is either **repeating** or a **one-off**.

A repeating schedule has a cadence and keeps going. A one-off has a single date
and time -- it generates its checklists once and then closes itself. A closed
one-off stays in the list as a record of what ran, and it does not fire again.

Pick between them with the tabs at the top of the new-schedule form.

## What a schedule is

A schedule is its own thing, not a setting on one workflow. It holds:

- **A name** -- what the recurring event is called. "Monday morning open."
- **A cadence** -- how often it runs, like "At 9:00 AM, only on Monday". A
  one-off has a single date and time instead.
- **A time zone** -- the zone the cadence is read in.
- **Workflows** -- one or more. Every one of them gets its own checklist each
  time the schedule fires.
- **An overlap rule** -- what to do when the last checklist is still open.
  Repeating schedules only: a one-off has nothing of its own to overlap with.

The reason a schedule can name several workflows is that real recurring work
usually is several. "Monday morning open" might be a walkaround, a till count
and a safety check. That is one cadence covering three workflows, not three
copies of the same cron that drift apart the first time someone edits one.

## Creating one

**Schedules** in the sidebar, then **New schedule**:

1. Pick **Repeating** or **One-off**.
2. Set when it runs. See [Cadences](#cadences) below.
3. Check the time zone. It is pre-filled from your browser.
4. Tick the workflows it should run.
5. Name it, then press **Create schedule**.

The panel on the right says what the schedule will do in plain English, and
lists the next times it fires. Read those before you save.

Any member of your organization can create a schedule. You can also start from a
workflow: open it, and the **Schedule** card offers to put that one on a
schedule with it already ticked.

### Start one now instead

**Start one now instead**, under the same panel, generates the checklists you
have ticked immediately and creates no schedule. Use it when you came to
schedule something and found that you wanted it today.

## Cadences

A repeating schedule starts from a preset -- **Every weekday**, **Monday open**,
**Nightly**, **Start of month** or **Quarterly**. Most schedules are one of
these, and picking one is the whole step.

**Custom...** opens the full builder, already filled in with whichever preset
you had picked, so you can adjust it rather than start again. **Repeats** picks
the shape, and the controls beside it fill in the rest:

- **By the minute** -- every 1, 2, 5, 10, 15, 20 or 30 minutes.
- **Hourly** -- every 1, 2, 3, 4, 6, 8 or 12 hours, at a chosen number of
  minutes past the hour.
- **Daily** -- one time of day.
- **Weekly** -- one time of day, on the days you tick. Tick as many as you want.
  Monday to Friday is five ticks.
- **Monthly** -- one time of day, on one day of the month, every month or every
  few months. Pick every 3 months for a quarterly schedule.
- **Yearly** -- one time of day, on one date.
- **Custom cron** -- a cron expression. See [Custom cron](#custom-cron) below.

The panel on the right shows the next four times the schedule fires. Read them
before you save. They are what shows a cadence that is right in words and wrong
in practice -- a schedule on the 31st does not fire in February, and a weekly
one you build on a Tuesday may not fire until next week.

### Days a month does not have

A monthly schedule on the 29th, 30th or 31st fires only in the months that have
that day. It does not move to the last day of a shorter month. If you want the
last day of every month, use a custom cron expression of `0 9 L * *`.

### Custom cron

**Custom cron** takes a five-field cron expression: minute, hour, day of month,
month, day of week. Use it for a cadence the controls do not cover.

These all work:

- `0 9 * * MON-FRI` -- 9:00 AM on weekdays, written with day names.
- `0 9,17 * * *` -- twice a day, at 9:00 AM and 5:00 PM.
- `0 9 L * *` -- 9:00 AM on the last day of every month.
- `10 15 * * 6#3` -- 3:10 PM on the third Saturday of the month.
- `0 9 1,15 * *` -- 9:00 AM on the 1st and the 15th.

A custom expression is read back into plain English the same way the controls
are, so you can tell from the sentence underneath whether you wrote what you
meant.

Seconds are not accepted. Flightplan checks its schedules once a minute, so a
minute is the finest cadence it can honestly offer.

## One-off runs

A one-off has a date, a time and a time zone. **Today**, **Tomorrow**, **In 3
days** and **In 7 days** fill in the date for you; the date box takes any other
day.

The moment has to be in the future. A time that has already passed today is
refused, because a schedule that fires the second you save it is what **Start
one now instead** is for.

After a one-off fires it is marked **Done** and it stops. Deleting it does not
affect the checklists it generated.

## Time zones

A schedule fires on its own zone's wall clock, not on UTC. A schedule set to
9:00 AM in `America/Chicago` fires at 9:00 AM in Chicago in January and at 9:00
AM in Chicago in July, even though those are different hours in UTC.

This is the one place in the app that does not follow your own clock. Every
other time -- when a task was completed, when a checklist started -- is shown
in the time zone of the browser you are reading it in, with the zone named next
to it. A schedule keeps the zone it was given, because that is the promise it
made.

## What arrives

A scheduled checklist is an ordinary checklist. It is generated exactly like one
you make by hand:

- It pins the workflow version at the moment it fires, so editing the workflow
  on Tuesday changes Wednesday's checklist and nothing already running.
- Its first tasks turn Ready straight away and appear in the right people's
  [My work](my-work.md).
- Any [connection](faq.md) a task calls when it becomes ready is called, the
  same as always.

The checklist is named after its workflow and the date. Its author reads
**Scheduled** rather than a person's name.

## If the last checklist is still open

This applies to repeating schedules. A one-off fires once, so it never catches
its own last checklist.

By default a schedule **skips** a workflow whose last checklist from that
schedule is still open. A walkaround nobody finished should not quietly stack up
into five open walkarounds.

The skip is per workflow, not per schedule. If "Monday morning open" runs three
workflows and only the till count is still open, the other two are generated as
usual.

Change the rule to **Generate anyway** if you would rather have the new one
regardless.

## Pausing

**Pause** stops a schedule without deleting it. Nothing is generated while it is
paused.

**Resume** sets the next run from now, rather than from where it left off. A
schedule paused for a month does not come back and immediately fire -- which
would be the opposite of what pausing it meant.

A paused one-off resumes onto the date it already had. If that date has gone by
while it was paused, it cannot be resumed -- create a new one-off for a new
time.

## A missed window generates one checklist, not a backlog

If nothing was generated for a while -- a long outage, or a schedule that was
paused -- the schedule fires once when it comes back and then carries on
normally.

It does not create one checklist for every window that went by. Thirty daily
walkarounds nobody is going to do is not a useful record of anything, and the
work in those windows is already gone.

## Deleting

Deleting a schedule stops it generating anything. The checklists it already
generated are unaffected -- they stay in the history with their cadence intact.

## Next

- [Workflows](workflows.md)
- [Checklists](checklists.md)
- [Common questions](faq.md)
