Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Scheduled events allow you to raise an event at a point in time or on a recurring schedule.  Scheduled events function like a raised event with a few restrictions.

...

and are scheduled for the current pico

...

Table of Contents
maxLevel3
indent15px

...

schedule:list()

Returns an array of scheduled eventsevents schedule by the ruleset it is executed in. For example:

Code Block
languagejs
themeConfluence
[
  {
    id: "cj2j53ckp0000vgdx7p8rxw0o",
    at: "2017-12-25T00:00:00.000Z",
    event: {domain: "holiday", type: "christmas", attrs: {}}
  },
  {
    id: "cj2j54lc90001vgdxsdhr3kgn",
    at: "2018-01-01T00:00:00.000Z",
    event: {domain: "holiday", type: "new-years-day", attrs: {}}
  },
  {
    id: "cj2j54qpc0002vgdxdbqe2cwj",
    timespec: "*/1 * * * * *",
    event: {domain: "every", type: "1second", attrs: {}}
  }
]

...

It accepts an id for a scheduled event.  This id could come from event:list_scheduled() or from the postlude. It removes the scheduled event from the queue. If it fails it will throw an error. A ruleset can only remove an event that it scheduled.

Code Block
languageJavaScript
themeConfluence
schedule:remove("cj2j54qpc0002vgdxdbqe2cwj");

...