Skip to content

Commit

Permalink
Altering schedule docs
Browse files Browse the repository at this point in the history
  • Loading branch information
john-westcott-iv committed Apr 18, 2022
1 parent e8977e6 commit 098eff9
Showing 1 changed file with 33 additions and 11 deletions.
44 changes: 33 additions & 11 deletions docs/schedules.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ an `HTTP POST` to a variety of API endpoints:
}

...where `rrule` is a valid
[RFC5545](https://www.rfc-editor.org/rfc/rfc5545.txt) RRULE string. The
specific example above would run a job every day - for seven consecutive days - starting
[RFC5545](https://www.rfc-editor.org/rfc/rfc5545.txt) RRULE string and within AWX [RRULE Limitations](#rrule-limitations).
The specific example above would run a job every day - for seven consecutive days - starting
on January 15th, 2030 at noon (UTC).

For more examples see [RRULE Examples](#rrule-examples).

## Specifying Timezones

Expand Down Expand Up @@ -111,16 +112,16 @@ local and UTC time:

The following aspects of `RFC5545` are _not_ supported by AWX schedules:

* The RRULE must start with the `DTSTART` attribute
* Strings with more than a single `DTSTART:` component
* Strings with more than a single `RRULE` component
* The use of `FREQ=SECONDLY` in an `RRULE`
* The use of more than a single `FREQ=BYMONTHDAY` component in an `RRULE`
* The use of more than a single `FREQ=BYMONTHS` component in an `RRULE`
* The use of `FREQ=BYYEARDAY` in an `RRULE`
* The use of `FREQ=BYWEEKNO` in an `RRULE`
* The use of `FREQ=BYWEEKNO` in an `RRULE`
* The use of `COUNT=` in an `RRULE` with a value over 999

* At least one RRULE must be in the string
* The use of `RDATE` or `EXDATE`
* For any of the rules in the rrule:
* Interval must be included
* The use of `FREQ=SECONDLY` in an `RRULE`
* The usage of a `BYDAY` with a prefixed number
* The usage of both `COUNT` and `UNTIL` in the same RRULE
* The use of `COUNT=` in an `RRULE` with a value over 999

## Implementation Details

Expand All @@ -141,3 +142,24 @@ database for Schedules where `Schedule.next_run` is between
`scheduler_last_runtime()` and `utcnow()`. For each of these, a new job is
launched, and `Schedule.next_run` is changed to the next chronological datetime
in the list of all occurences.


## Complex RRULE Examples

Every day except for April 30th:

DTSTART;TZID=US/Eastern:20230428T170000 RRULE:INTERVAL=1;FREQ=DAILY EXRULE:INTERVAL=1;FREQ=DAILY;BYMONTH=4;BYMONTHDAY=30

Every 5 minutes but not on Mondays from 5-7pm:

DTSTART;TZID=America/New_York:20220418T164500 RRULE:INTERVAL=5;FREQ=MINUTELY EXRULE:FREQ=MINUTELY;INTERVAL=5;BYDAY=MO;BYHOUR=17,18

Every 15 minutes Monday to Friday from 10:01am to 6:02pm (inclusive):

DTSTART;TZID=America/New_York:20220417T100100 RRULE:INTERVAL=15;FREQ=MINUTELY;BYDAY=MO,TU,WE,TH,FR;BYHOUR=10,11,12,13,14,15,16,17,18 EXRULE:INTERVAL=15;FREQ=MINUTELY;BYDAY=MO,TU,WE,TH,FR;BYHOUR=18;BYMINUTE=3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,34,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59

Any Saturday whose month day is between 12 and 18:

DTSTART:20191219T130551Z RRULE:FREQ=MONTHLY;INTERVAL=1;BYDAY=SA;BYMONTHDAY=12,13,14,15,16,17,18


0 comments on commit 098eff9

Please sign in to comment.