Page MenuHomePhabricator

Implement "trigger clocks" for scheduling events
ClosedPublic

Authored by epriestley on Jan 15 2015, 2:19 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 11, 10:08 AM
Unknown Object (File)
Thu, Mar 28, 7:55 PM
Unknown Object (File)
Mon, Mar 25, 11:23 AM
Unknown Object (File)
Sat, Mar 23, 11:39 PM
Unknown Object (File)
Mar 19 2024, 9:11 AM
Unknown Object (File)
Mar 19 2024, 9:11 AM
Unknown Object (File)
Mar 19 2024, 9:11 AM
Unknown Object (File)
Mar 19 2024, 9:04 AM
Subscribers

Details

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.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Implement "trigger clocks" for scheduling events.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.
  • Add some comments clarifying that time must move forward.
btrahan edited edge metadata.

Nice comments!

This revision is now accepted and ready to land.Jan 15 2015, 6:29 PM
This revision was automatically updated to reflect the committed changes.