Schedules

An entry point is a top-level file whose name ends .cron.js and carries a schedule keyword — .every, .daily or .hourly — followed by a time token. The name is parsed as:

<base-name> . <keyword> . <time-token> . cron . js
   report    .  hourly  .     30      . cron . js

This page is the definitive grammar. If a top-level filename does not match one of the patterns below it is treated as a supporting file, not a job.

Intervals — .every

Run repeatedly at a fixed spacing. N is any positive integer.

PatternMeaningExampleNotes
<name>.every.<N>ms.cron.jsevery N millisecondspoll.every.500ms.cron.jsSub-second; use sparingly.
<name>.every.<N>s.cron.jsevery N secondsping.every.30s.cron.jsN ≥ 1.
<name>.every.<N>m.cron.jsevery N minutesdigest.every.30m.cron.jsN ≥ 1.
<name>.every.<N>h.cron.jsevery N hourssync.every.6h.cron.jsN ≥ 1.
<name>.every.<N>d.cron.jsevery N daysprune.every.7d.cron.jsN ≥ 1. Spacing, not a wall-clock time — see .daily for that.

Interval jobs are spaced from the runner's own clock, not aligned to the wall clock: an every.6h job fires every six hours from when the runner started tracking it, not at 00:00/06:00/12:00/18:00. Use .daily/.hourly when you need a specific clock time.

Daily — .daily

Run once a day at a fixed clock time. The token is zero-padded and range-checked.

PatternMeaningExampleRanges
<name>.daily.<HH>.cron.jsdaily at HH:00report.daily.09.cron.jsHH 0023
<name>.daily.<HHMM>.cron.jsdaily at HH:MMbackup.daily.0300.cron.jsHH 0023, MM 0059
<name>.daily.<HHMMSS>.cron.jsdaily at HH:MM:SSchime.daily.083000.cron.jsHH 0023, MM/SS 0059

Hourly — .hourly

Run once an hour at a fixed offset past the hour.

PatternMeaningExampleRanges
<name>.hourly.<MM>.cron.jsat MM past every hoursweep.hourly.15.cron.jsMM 0059
<name>.hourly.<MMSS>.cron.jsat MM:SS past every hourtick.hourly.3000.cron.jsMM/SS 0059

Base-name extraction & the mutex

The base name is everything before the schedule keyword. It is a job's identity and its mutex key.

FilenameBase name
report.hourly.30.cron.jsreport
backup.daily.0300.cron.jsbackup
daily-summary.every.6h.cron.jsdaily-summary

At most one process per base name runs at a time across the whole runner. A tick that fires while a run with the same base name is still active is skipped — never queued. The Scripts reference states this precisely, and Usage → Server works through what it means at runtime.

The duplicate idiom

There is no multi-time token. To run at several clock times, write one file per time, sharing a base name:

report.hourly.00.cron.js     →  at :00
report.hourly.30.cron.js     →  at :30   (base name "report" — same mutex)

Because the copies share the base name report, they share the single-instance mutex and can never overlap. That is what makes the idiom safe: it is one job that fires on two schedules, not two jobs racing each other. Beware the flip side — two unrelated files that happen to share a base name will serialise too; see the base-name collision note on Usage → Client.