[Index]

schedules:monthly


A schedule for monthly intervals. The intervals can be specified as days of the month, a day of the week in a week of the month, or less usefully as weeks of the month.

The day of the month is given as an number, normally 1 to 31. 0 and negative numbers can be used to specify days from the end of the month. The words LAST and PENULTIMATE (case insensitive) can also be used as a convenience. Note that unlike the java GregorianCalander, 0 and negative numbers are taken to be this month, not the previous month. i.e. on="0" is the last day of the month and is equivalent to on="LAST".

Days and week of the month are given as the day number, 1 to 7, or as one of MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY (case insensitive). The week of the month is specified as a number, typically 1 to 5, or using one of FIRST, SECOND, THIRD, FOURTH, FIFTH, PENULTIMATE, or LAST (case insensitive).

If the week of the month is specified on it's own then the first week is taken to be the first complete week of the month.


Property Summary

fromDay The from day of the month.
fromDayOfWeek The from day of the week.
fromWeek The from week of the month.
inWeek The in week of the month.
onDay The day on which this schedule is for.
onDayOfWeek The on day of the week.
refinement Provide a refinement to this schedule.
toDay The to day of the month.
toDayOfWeek The to day of the week.
toWeek The to week of the month.

Example Summary

Example 1 A range of days of the month.
Example 2 On a single day of the month.
Example 3 On the last Friday of the month.

Property Detail

fromDay

Configured ByATTRIBUTE
AccessREAD_WRITE
RequiredNo. Defaults to 1.

The from day of the month.

fromDayOfWeek

Configured ByATTRIBUTE
AccessREAD_WRITE
RequiredNo.

The from day of the week. Used in conjunction with fromWeekOfMonth.

fromWeek

Configured ByATTRIBUTE
AccessREAD_WRITE
RequiredNo.

The from week of the month.

inWeek

Configured ByATTRIBUTE
AccessWRITE_ONLY
RequiredNo.

The in week of the month. This is equivalent to setting fromWeek and toWeek to the same thing.

onDay

Configured ByATTRIBUTE
AccessWRITE_ONLY
RequiredNo.

The day on which this schedule is for. This has the same effect as setting fromDay and toDay to the same thing.

onDayOfWeek

Configured ByATTRIBUTE
AccessWRITE_ONLY
RequiredNo.

The on day of the week. This is equivalent to setting fromDayOfWeek and toDayOfWeek to the same thing.

refinement

Configured ByELEMENT
AccessREAD_WRITE
RequiredNo.

Provide a refinement to this schedule.

toDay

Configured ByATTRIBUTE
AccessREAD_WRITE
RequiredNo. Defaults to the last day of the month.

The to day of the month.

toDayOfWeek

Configured ByATTRIBUTE
AccessREAD_WRITE
RequiredNo.

The to day of the week. Used in conjunction with toDayOfWeek.

toWeek

Configured ByATTRIBUTE
AccessREAD_WRITE
RequiredNo.

The to week of the month.


Examples

Example 1

A range of days of the month.

<schedules:monthly fromDay="17" toDay="22" xmlns:schedules="http://rgordon.co.uk/oddjob/schedules">
     <refinement>
        <schedules:daily at="10:00"/>
     </refinement>
</schedules:monthly>
This would schedule a job to run every day from the 17th of each month to the 25th of each month at 10am.

Example 2

On a single day of the month.

<schedules:monthly onDay="15" xmlns:schedules="http://rgordon.co.uk/oddjob/schedules"/>
This will run a job on the 15th of every month.

Example 3

On the last Friday of the month.

<schedules:monthly onDayOfWeek="FRIDAY" inWeek="LAST" xmlns:schedules="http://rgordon.co.uk/oddjob/schedules">
     <refinement>
        <schedules:time at="07:00"/>
     </refinement>
</schedules:monthly>


(c) R Gordon Ltd 2005 - Present