Skip to content

History / Recurring Tasks Developer Guide

Revisions

  • Repeating tasks: user page and developer guide Recurrence shipped this morning (#1306) and the wiki said nothing about it - Tasks.md did not mention repeats at all. Recurring-Tasks.md is the user page. It opens with the red banner, because the one thing on it whose absence is silent is the cron job: a fixed schedule needs cron/task_recurrence.php, a fresh install has no scheduled tasks, and the failure produces no error and no log entry. The banner also says which half is unaffected, so nobody sets up a scheduled task they do not need. Then the two modes as a comparison table with the question that actually settles it (should being late push the next one back, or leave you with two to do), the patterns including the two edges that drop a month elsewhere, the endings with the warning that a count of five includes the task in front of you, what carries over and why attachments are the one to think about, when an occurrence actually appears, the preview, and a troubleshooting list ordered by likelihood with the missing cron job first. Recurring-Tasks-Developer-Guide.md is the one worth reading before touching the code. It records the two faults that were shipped and fixed rather than describing the current state as if it were obvious: - An occurrence is created when work can START, not when it falls due. The first version used the due date, so a fortnight-long task was born a fortnight past the day it should have been started. - The date arithmetic mixed strtotime() with gmdate(), landing a day early east of Greenwich and correctly in midwinter - invisible for five months of the year. A second fault, truncating the gap across a clock change, cancelled it for some inputs, so fixing either alone would have exposed the other. Also: why the completion hook is on BOTH saveTask and moveTask (moveTask dispatches no workflow event, and dragging is the commoner action), why ruleFromInput has exactly one home, why projections are filtered client-side and read body[data-analyst-id], and why runDue takes a list of recurrence ids - a test calling it unscoped operates on every series in the database and created a real occurrence of a real task while the start-date fix was being tested. Ends with a table of things that look like bugs and are not, which is the section this feature most needed. Both wired into _Sidebar.md under Tasks, with a pointer and the cron warning added to Tasks.md. Every link resolves and every file path named in the guide was checked to exist.

    @edmozley edmozley committed Aug 30, 2026