Skip to content

Notifications

onNotify returns zero or more of these:

{ type: string; title: string; subtitle?: string; body?: string; url?: string; dedupeKey?: string; cooldown?: Duration }
  • type must be declared in meta.notifications, and title is required. Entries that break either rule are dropped with a warning.
  • Limits: title and subtitle at most 120 characters, body at most 1,000, and at most 20 notifications per run.
  • dedupeKey and cooldown control repeats. The host does not deliver the same (item, type, dedupeKey) twice within cooldown (default 6h). Without a dedupeKey, the title and body together act as the key. Put what makes an event unique in the key, for example `comments-${count}` or `below-${day}`.
  • Tapping a notification opens its item in the app. When url is set, the notification also offers an Open Link action.

onNotify only asks. The host decides what is delivered, checking each request in this order:

  1. Type switched off. The user turned the type off for this item (types start as their default).
  2. Muted. The user muted the item: “Mute for 1 Day” on the notification, the card or the item.
  3. Duplicate. The same (type, key) was delivered within the cooldown.
  4. Rate limit. At most 10 notifications per item per rolling hour. The rest are collapsed into one “+N more updates” notification (at most one of those per hour).
  5. Permission. Notifications are off for the app, or the system refused the notification.

Every request is recorded in the item’s notification history, delivered or not, with the reason it was held back. Notifications are grouped per item, and level sets the interruption level (Time Sensitive can still be turned off by the user in Settings).

The server applies the same rules to the items it runs.

The host sends two kinds of its own notifications, which do not go through meta.notifications:

  • _more: the “+N more” summary above.
  • _failure: sent once when an item fails 3 times in a row. Users turn it on per item (“When It Keeps Failing”); it is off by default.

Items run when the app opens, on pull to refresh, on Update Now, and in the background when iOS allows it. Background wakes are at least 15 minutes apart, are often much further apart, and stop after the user force-quits the app. So schedule.every is a wish, not a promise. A background wake has about 25 s for all due items, the most overdue first:

  • Each run’s timeout is shortened to the time that is left, and a run that uses it up fails with timeout.
  • Items that don’t get a turn wait for the next wake or the next app launch.
  • If iOS ends the wake early, runs in progress are dropped without saving anything and are not counted as failures.

On the Mac and on the server, items run on their schedule. See How updates work.