Homec4science

Implement "trigger clocks" for scheduling events

Authored by epriestley <git@epriestley.com> on Jan 16 2015, 00:57.

Description

Implement "trigger clocks" for scheduling events

Summary:
Ref T6881. This will probably make more sense in a couple of diffs, but this is a class that implements scheduling/recurrence rules. Two rules are provided:

  • Trigger an event at a specific time (e.g., a meeting reminder notification).
  • Trigger an event on the Nth day of every month (e.g., a subscription bill).

At some point, we'll presumably add a rule for T2896 (maybe using the "RRULE" spec) so you can do stuff like "the second to last thursday of every month", etc., but we don't need that for now.

(The "Nth day of every month, or move it back if no such day exists" rule doesn't seem to be expressible with the "RRULE" format, so implementing that wouldn't give us a superset of this. I think this rule is correct and desirable for this purpose, though.)

Test Plan: Added and executed unit tests.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T6881

Differential Revision: https://secure.phabricator.com/D11403

Details

Committed
epriestley <git@epriestley.com>Jan 16 2015, 00:57
Pushed
aubortJan 31 2017, 17:16
Parents
rPHb9788fed0060: Recover more cleanly from worker tasks with unconstructable classes
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH66975fa51bc3: Implement "trigger clocks" for scheduling events (authored by epriestley <git@epriestley.com>).Jan 16 2015, 00:57