This specifies the minute on which the job is to run. This specifies the hour on which the job is to run. For example, -1 FRI is the last Friday of the month. Using the minus sign, you can say the second to last Friday of the month. Using numbers, you can specify the 26th Friday of the year, if using a YEARLY frequency, or the 4th THU of the month, using a MONTHLY frequency. This specifies the day of the week from Monday to Sunday in the form MON, TUE, and so on. You can use the minus sign (-) to count backward from the last day, so, for example, BYMONTHDAY=-1 means the last day of the month and BYMONTHDAY=-2 means the next to last day of the month. An example is 10, which means the 10th day of the selected month. This specifies the day of the month as a number. BYDATE=0205-OFFSET:2W is equivalent to BYDATE=0205-14D (the OFFSET: keyword is optional), which is also equivalent to BYDATE=0122. Offsets adjust the supplied date by adding or subtracting n days or weeks. If n is an even number, it is adjusted up to the next odd number. The minus sign indicates a span ending at the supplied date, and the "^" sign indicates a span of n days or weeks centered around the supplied date.
The plus sign in front of the SPAN keyword indicates a span starting at the supplied date. The following SPAN example is equivalent to BYDATE=0110,0111,0112,0113,0114, which is a span of 5 days starting at 1/10: An example of a simple BYDATE clause follows: A list of consecutive dates can be generated by using the SPAN modifier, and a date can be adjusted with the OFFSET modifier. This specifies a list of dates, where each date is of the form MMDD. 2 will always evaluate to December 30th independent of whether it is a leap year. 69 evaluates to March 10 for non-leap years and March 9 in leap years. An example is 69, which is March 10 (31 for January, 28 for February, and 10 for March). This specifies the day of the year as a number.
So December 29th, 1997, is in the ISO week 1998-01, and January 1st, 1999, is in the ISO week 1998-53.Įxamples of invalid specifications are "FREQ=YEARLY BYWEEKNO=1 BYMONTH=12" and "FREQ=YEARLY BYWEEKNO=53 BYMONTH=1". The ISO-8601 week numbers are integers from 1 to 52 or 53 parts of week 1 may be in the previous calendar year parts of week 52 may be in the following calendar year and if a year has a week 53, parts of it must be in the following calendar year.Īs an example, in the year 1998, the ISO week 1 began on Monday December 29th, 1997 and the last ISO week (week 53) ended on Sunday January 3rd, 1999. The first week is equivalent to the following two variants: the week that contains the first Thursday of the Gregorian year and the week containing January 4th. It follows ISO-8601, which defines the week as starting with Monday and ending with Sunday and the first week of a year as the first week, which is mostly within the Gregorian year. This specifies the week of the year as a number. You can use numbers such as 1 for January and 3 for March, as well as three-letter abbreviations such as FEB for February and JUL for July. This specifies which month or months you want the job to execute in.
The default is 1, which means every second for secondly, every day for daily, and so on. This specifies a positive integer representing how often the recurrence repeats. Alternatively, specifies an existing schedule to use as a user-defined frequency. The possible predefined frequency values are YEARLY, MONTHLY, WEEKLY, DAILY, HOURLY, MINUTELY, and SECONDLY. Table 140-1 Values for repeat_interval Name Schedule_clause = named_schedule īyperiod_clause = "BYPERIOD" "=" period_list Schedule_list = schedule_clause ("," schedule_clause)* Intersect_clause = "INTERSECT" "=" schedule_list Include_clause = "INCLUDE" "=" schedule_listĮxclude_clause = "EXCLUDE" "=" schedule_list , hh24mmssīyminute_clause = "BYMINUTE" "=" minute_listīysecond_clause = "BYSECOND" "=" second_listīysetpos_clause = "BYSETPOS" "=" setpos_list Monthday_list = monthday ( "," monthday)*ĭaynum = 1 through 53 /* if frequency is yearly */ĭaynum = 1 through 5 /* if frequency is monthly */ĭay = "MON" | "TUE" | "WED" | "THU" | "FRI" | "SAT" | "SUN"īYTIME clause: BYTIME= Weeknumber_list = weeknumber ( "," weeknumber)*īyyearday_clause = "BYYEARDAY" "=" yearday_listīymonthday_clause = "BYMONTHDAY" "=" monthday_list "JUL" | "AUG" | "SEP" | "OCT" | "NOV" | "DEC"īyweekno_clause = "BYWEEKNO" "=" weeknumber_list
Interval_clause = "INTERVAL" "=" intervalnumĬhar_month = "JAN" | "FEB" | "MAR" | "APR" | "MAY" | "JUN" |
įrequency_clause = "FREQ" "=" ( predefined_frequency | user_defined_frequency ) Repeat_interval = regular_schedule | combined_schedule In the calendaring syntax, * means 0 or more. It is followed by descriptions of various parts of the syntax. This section starts with the calendaring syntax.