The beta3 release introduced the scheduling component of the workflow
engine. This gives you the ability to schedule events based on a
calendar, fixed-interval repeats, or at a user-specified date and
time. The available resolution ranges from one minute to one year.
Schedules are attached to events with the "when" attribute of a
an "event" tag in a workflow script.
The examples included in this beta are
- a reminder e-mail every 24 hours for pages requiring approval
- a scheduling script that allows an approving user to specify
date and time that a certain page should appear and expire,
either by disappearing or reverting to a different edition
- a commented-out section in the publish script is set up to
perform automatic publication every Monday morning
The three scheduling formats correspond to the following patterns:
Calendar:
when="@ min [hour [day [week [month]]]]"
Examples:
when="@ 0" // every hour on the hour
when="@ 0 20" // 8pm daily
when="@ 0 20 1" // 8pm every Sunday
when="@ 0 20 1 6" // 8pm last Sunday of every month
when="@ 0 20 15 0" // 8pm on the 15th of every month
when="@ 0 20 15 0 4" // 8pm on April 15th every year
when="@ 12 3 5 6 11" // 3:12am on the last Thursday of November
Fixed interval schedule:
when="in num (mi(ns)|h(ours)|d(ays)|w(eeks)|mo(nths)|y(ears)) [*(reps)]"
Examples
when="in 12 min" // in 12 minutes, do not repeat
when="in 1 d *" // in 1 day, repeat indefinitely
when="in 3 mo *4" // in 3 months, repeat 4 times
Specific date/time
when="yyyy-MM-dd hh:mm"
Example
when="2005-07-08 20:00"