Notifications
The request
Section titled “The request”onNotify returns zero or more of these:
{ type: string; title: string; subtitle?: string; body?: string; url?: string; dedupeKey?: string; cooldown?: Duration }typemust be declared inmeta.notifications, andtitleis 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.
dedupeKeyandcooldowncontrol repeats. The host does not deliver the same (item, type,dedupeKey) twice withincooldown(default6h). Without adedupeKey, 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
urlis set, the notification also offers an Open Link action.
Delivery rules
Section titled “Delivery rules”onNotify only asks. The host decides what is delivered, checking each request in this order:
- Type switched off. The user turned the type off for this item (types start as their
default). - Muted. The user muted the item: “Mute for 1 Day” on the notification, the card or the item.
- Duplicate. The same (type, key) was delivered within the cooldown.
- 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).
- 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’s own notifications
Section titled “The host’s own notifications”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.
When actions run
Section titled “When actions run”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
timeoutis shortened to the time that is left, and a run that uses it up fails withtimeout. - 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.