Section: Schedules
The
Calendars
A calendar is a set of days, which can restrict scheduled events. When a scheduled event is linked to a calendar, the event will only be activated if the current day is included in the calendar.
A calendar is defined with the following values:
- Father calendar
- Day Start (day and month with optional year)
- End day (day and month with optional year)
- Weekdays
- Months
- Inclusions (list of days with month, optional year)
- Exclusions (list of days with month, optional year)
The algorithm to determine if one day belongs to a calendar follow these rules in order:
- If the day meets an inclusion, the day belongs.
- If the day is before the start or is after the end, the day does not belong. (If there is no defined year, the year will be the day).
- If there is a parent calendar and the day does not belong to the parent calendar, the day does not belong to this calendar.
- If the day or month is not on the list of days of the week or months, the day does not belong.
- If the day meets some exclusion, the day does not belong.
- If no previous rule is met, the day belongs.
Periodic events
Periodic events are shot in equal time ranges. The parameter shoots each, defines each as the event is triggered, it contains a drop-down to choose the time unit.
Periodic events have a name that differentiates them from each other.
Programmed events
A scheduled event is triggered every time the local time fulfills the established rules. It allows to launch periodic events with more complex rules than a fixed period.
For example, you could specify an event scheduled for the second 0 of each minute, so that it is known with certainty that every minute is fired but synchronized with the change.
Scheduled events may be linked to a calendar, for example, you could create an "opening" type event at 8:00 a.m., but restricted to a calendar that only included from Monday to Friday and exclude holidays.
The scheduled events can have a duration, in which case a deactivation event is generated once that duration has elapsed from the beginning.
To detect and handle the case that a system cut (scheduled restart, current cutting, ...) prevents launching the End event, a restart configuration is available. The configuration of shooting in restart may have three values:
- No: never shoot when you start the system
- Always: Shoot whenever the system starts an event, this will be started if it is within the duration of the event (time and duration rules) or the end of the opposite
- When there is a state change: Shooting only if the programming implies that you should have triggered before and given the duration I would not have fired the end of this event
There are two ways to define the programming of this type of events.
CRON-like nomenclature
A CRON chain has 5 or 6 fields, separated by spaces. Each field of the rule can be a number, a list of numbers, a range (two numbers separated by script) or an asterisk, the asterisk represents all possible numbers.
The order of the fields is as follows (from left to right):
- Seconds (only if there are 6 fields, if not the omitted field is this. If it is omitted value 0)
- minutes
- hours
- Day of the month
- Number of month, number or name is allowed in English (
January,February...; Abbreviations of three letters:Jan,Feb...) - Day of the week (0 and 7 correspond to Sunday), names are allowed in English (
Monday,Tuesday...; three-letter abbreviations:Mon,Tue...)
For example 0 * 1-5 2 3 would be the rule that would shoot when it was any time at point (minute 0, time *) From days 1 to 5 of the month, only in February and when the day Be Wednesday (day 3 of the week).
Note: The Web interface does not include any alert or warning if the specified cron rule is not valid.
Defining fields
If the CRON nomenclature is not marked, the equivalent fields can be specified in the form. Multiple numerical data is allowed to be inserted by comma, names are not allowed.
Note: By consistency and to avoid usual errors, if the hours are specified but the minutes are not, the field is set to 0 automatically. Likewise, if the minutes are established (even if they are by the previous rule) and the seconds do not, are set to 0 the seconds. In this way, it is avoided to have rules that shoot every second without being the original intention of the user.
Reacting to events
The reaction of the events is specified in the scripts. To see how to handle these events and other operations of