# Jobs and events

This page covers the work your app does outside a request: schedules that
run an action on a timer, events an action announces, subscribers that
react to them, and what happens when that work fails.

Three things start work, and each one calls an ordinary
[action](functions-and-actions.md), the kind of function that
reads and writes stored records:

| Trigger | Starts when | Lives in |
|---|---|---|
| Route | A request arrives | `routes/` ([HTTP](http.md)) |
| Schedule | A timer fires | `schedules/` |
| Subscriber | An event it listens for is committed | `subscribers/` |

All your logic lives in actions, so a reviewer reads one kind of code
whatever started it. A schedule or a subscriber only adds *when* to run
and *what happens if it fails*.

Two more things feed this work without being triggers of their own:

- Work over more items than one action can hold runs as a **batch**. An
  action starts it, and it calls an action for each item
  ([Batches](batches-work-over-many-items.md)).
- The outside world produces events for your subscribers: webhooks, a
  package's own events and polls, and messages read from a queue
  ([Events from outside](events-from-outside.md)).

Much of this page talks about the **tick**. The tick is the runtime's
regular wake-up, once a minute in most apps: it runs the schedules that
are due and picks up background work left over
([The tick](schedules.md#the-tick)).
