Diary Messages
nndiary messages are just normal ones, except for the mandatory presence of 7 special headers. These headers are of the form X-Diary-<something>, <something> being one of Minute, Hour, Dom, Month, Year, Time-Zone and Dow. Dom means “Day of Month”, and Dow means “Day of Week”. These headers actually behave like crontab specifications and define the event date(s):
- For all headers except the
Time-Zoneone, a header value is either a star (meaning all possible values), or a list of fields (separated by a comma). - A field is either an integer, or a range.
- A range is two integers separated by a dash.
- Possible integer values are 0–59 for
Minute, 0–23 forHour, 1–31 forDom, 1–12 forMonth, above 1971 forYearand 0–6 forDow(0 meaning Sunday). - As a special case, a star in either
DomorDowdoesn’t mean “all possible values”, but “use only the other field”. Note that if both are star’ed, the use of either one gives the same result. - The
Time-Zoneheader is special in that it can only have one value (GMT, for instance). A star doesn’t mean “all possible values” (because it makes no sense), but “the current local time zone”. Most of the time, you’ll be using a star here. However, for a list of available time zone values, see the variablenndiary-headers.
As a concrete example, here are the diary headers to add to your message for specifying “Each Monday and each 1st of month, at 12:00, 20:00, 21:00, 22:00, 23:00 and 24:00, from 1999 to 2010” (I’ll let you find what to do then):
X-Diary-Minute: 0
X-Diary-Hour: 12, 20-24
X-Diary-Dom: 1
X-Diary-Month: *
X-Diary-Year: 1999-2010
X-Diary-Dow: 1
X-Diary-Time-Zone: *