08-Jun-2026 — timezone-correct cron, carry config across task-id renames, and cap manual backup concu... #282

build 671commit 8de0684


Two defects in the scheduled-task scheduler:

  1. Timezone. cron.createTask was called with no options, so node-cron evaluated cron expressions in the container's system zone (UTC on Fly). "0 3 * * *" therefore fired at 03:00 UTC = 04:00 BST, an hour later than intended, and the UI (which renders in Europe/London) showed 04:00. Both createTask call sites now pass {timezone: "Europe/London"} via a shared scheduleTimezone constant, so daily-at-03:00 fires at 03:00 local year-round (BST and GMT) and the displayed next-run matches.

  2. Task-id rename silently disabled the task. enabled state, cron expression, settings and run history are all keyed by task id. When the backups task id changed from "all-environments-backup" to "backups", the persisted "enabled" flag no longer matched, so on the next restart the task registered with its code default enabled:false, the cron timer was never armed, and the daily run silently stopped.

ScheduledTaskDefinition now accepts an optional previousIds[]. On registration, migratePreviousTaskIds carries enabled/cron/settings and run-history forward from a legacy id to the current id when the current id has no saved configuration, and logs a loud WARNING so a rename can never silently disable a task again. The backups task declares previousIds: ["all-environments-backup"]. The decision logic is extracted into a pure carryForwardConfiguration function for testing.