This blog posting applies to Microsoft Office SharePoint Server 2007.
The SPSchedule class allows one to specify repeating schedules for timer jobs using derived classes such as SPMinuteSchedule, SPHourlySchedule, etc. Those are pretty easy to figure out from the SDK (http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.spschedule.aspx).
SPSchedule also provides a FromString(recurrenceValue) method that allows you to specify the same kinds of schedules from a text string, but allowable formats for the recurrenceValue string are not well documented. Here are legal formats I’ve discovered through testing.
Format
Description
Allowable values
m
minutes
0-59
s
seconds
ddd
abbreviated name of day of week
mon, tue, wed, thu, fri, sat, sun
d
numeric day of month
1-31
mmm
abbreviated name of month
jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec
HH:MM:SS
Time of day as hours, minutes, seconds using 24 hour-clock.
00:00:00 - 23:59:59
Syntax
every Interval minutes
Repeat every Interval minutes (starting at 0 seconds)
every Interval minutes at Begin
Repeat every Interval minutes starting at Begin seconds
every Interval minutes between Begin and End
Repeat every Interval minutes starting between Begin and End seconds
Parameter
Sample
Interval
every 15 minutes
Begin
every 15 minutes at 0
End
every 15 minutes between 0 and 15
hourly at Begin
Repeat every hour starting at Begin minutes
hourly between Begin and End
Repeat every hour starting between Begin and End minutes
hourly at 1
hourly between 1 and 10
daily at Begin
Repeat every day starting at Begin time
daily between Begin and End
Repeat every day starting between Begin and End times
daily at 09:00:00
daily between 09:00:00 and 17:30:00
weekly at Begin
Repeat every week starting at Begin day and time
weekly between Begin and End
Repeat every week starting between Begin and End day and times
ddd HH:MM:SS
weekly at mon 09:00:00
weekly between mon 09:00:00 and fri 17:30:00
monthly at Begin
Repeat every month starting at Begin day of month and time
monthly between Begin and End
Repeat every month starting between Begin and End day of month and times
d HH:MM:SS
monthly at 1 09:00:00
monthly between 1 09:00:00 and 15 17:30:00
yearly at Begin
Repeat every year starting at Begin month, day of month and time
yearly between Begin and End
Repeat every year starting between Begin and End month, day of month and times
mmm d HH:MM:SS
yearly at jan 1 09:00:00
yearly between feb 1 09:00:00 and apr 15 17:30:00