Highlights
job.describe()describes a pattern in words, e.g.0 12 * * MON-FRIgives
"At 12:00, on Monday, Tuesday, Wednesday, Thursday, and Friday.". English is the default and
swedishis included. You can pass your own language (typeCronDescribeLanguage), or spread a
built-in one to change parts of it, such astimeOfDayfor a 12-hour clock. Returnsundefined
for date-based jobs. (#479)LWin day-of-month lists, as in croner-rust:0 0 L,LW * *and0 0 1W,15W,LW * *now
work. In 11.0.1,LWin a list threw an error. (#475, fixes #473)
Upgrade notes
- Reusing a named options object for a second job now throws, because the name is already
taken. Before, the second job was silently created without a name. (#471) job.optionsis now a copy. Changing the object passed tonew Cron()after the job is
created (context,catch,protect, etc.) no longer affects the job. Croner also no longer
changes your options object, so frozen or reused objects work. (#471, fixes #470)- Date strings without a time or offset are read as wall-clock time.
startAt: "2016-12-01"is 00:00:00 in the job timezone, or in local time when neither
timezonenorutcOffsetis set. Before, the result depended on the host timezone.- With
timezoneorutcOffsetset, an ISO string without an offset keeps its time even when
that time falls in a DST gap of the host timezone. (#478)
- Day lists starting with
*count as unrestricted (OCPS 1.0 §6.1).0 12 *,1 * MONnow runs
on Mondays only, and0 12 L,* * MONruns every day. (#477)
Fixed
alternativeWeekdays: true:SUN-SUNmeans Sunday only, instead of every day. (#469)- With
intervaland astartAtin the past, the next run is no longer skipped when it is more
than one interval after the last run. (#480) - With
timezoneorutcOffsetset, an ISO string ending in a lowercasez(allowed by
RFC 3339) is read as UTC. (#481)
Docs
- A fixed-time job in a DST gap that ends at midnight (e.g. America/Nuuk on 30 March 2024) does not
run that day. This is now documented. (#467, fixes #466)
Maintenance
- Updated rollup to ~4.69.0. (#476)
Contributors
Thanks to @zzoraemon043, @mansur-akhmadi, @yuyongyan29-dev, @kevincommits, @ohad6k and
@SaneSanders for their first contributions, and to @okarin2033 for reporting #466.
Full changelog: 11.0.1...11.1.0