Calendar Schedules (Time-based Triggers)
Calendar schedules are triggered at specific times, either hourly, daily, weekly, monthly or yearly. Each calendar trigger is declared using the 'every' keyword. For basic information on the grammar for calendar schedules, please read the section on time based triggers in the writing scripts help file (see
Scheduling Script Language Summary). The calendar, or time based triggers are signified by using the 'every' keyword. The values entered after the keyword represent hourly, daily, weekly, monthly or yearly frequency that the defined tasks will be executed. See
Hourly Triggers,
Daily Triggers,
Weekly Triggers,
Monthly Triggers,
Yearly Triggers.
This section will describe in more detail the variations of the calendar trigger grammar.
Hourly Triggers
Hourly triggers have the simplest grammar. The value after the 'every' keyword represents the minutes past the hour that the tasks will be executed. For example, specifying '00' means that the tasks are executed on the hour, every hour. If you specify '30' the tasks will be executed at half past the hour every hour:
/*
Execute every hour on the hour
*/
every 00 {
}
/*
Execute every hour at half past the hour
*/
every 30 {
}
Daily Triggers
Daily triggers are executed every day at a specific time. The time of day is written as 'HH:MM', in a 24 hour clock format and represents the exact time of day that the tasks are executed. For example, specifying '18:00' means the tasks are executed every day at 6pm. If you specify '08:30' the tasks will be executed at 8.30am every morning.
/*
Execute day at 6pm
*/
every 18:00 {
}
/*
Execute day at 8.30am
*/
every 08:30 {
}
Weekly Triggers
Weekly triggers are executed on specific days of the week at a specific time, in the format 'DD HH:MM' . The days are represented as a 2 character string being one of : Su; Mo; Tu; We; Th; Fr; Sa, and you can specify more than one day. The time of day is written as 'HH:MM', in a 24 hour clock format and represents the exact time on each given day that the tasks are executed. For example, specifying 'Fr 18:00' means the tasks are executed every friday at 6pm. If you specify 'Mo Tu We Th Fr 18:30' the tasks will be executed every week day at 6.30pm.
/*
Execute every friday at 6pm
*/
every Fr 18:00 {
}
/*
Execute every week day at 6.30pm
*/
every Mo Tu We Th Fr 18:30 {
}
Monthly Triggers
Monthly triggers are executed on a specific day of the month at a specific time, in the format 'DD HH:MM' . The day is represented as a 2 digit number between 1 and 28. The time of day is written as 'HH:MM', in a 24 hour clock format and represents the exact time on the given day of the month that the tasks are executed. For example, specifying '01 18:00' means the tasks are executed on the 1st of every month at 6pm.
/*
Execute on the first of every month at 6pm
*/
every 01 18:00 {
}
Yearly Triggers
Yearly triggers are executed on a specific day and month of the year at a specific time, in the format 'DD-MMM HH:MM'. The day of the month is represented as a 2 digit number between 1 and 31, and the month is represented as a 3 character string being one of : Jan; Feb; Mar; Apr; May; Jun; Jul; Aug; Sep; Oct; Nov; Dec. The time of day is written as 'HH:MM', in a 24 hour clock format and represents the exact time on the given day and month of the year that the tasks are executed. For example, specifying '01-Jan 18:00' means the tasks are executed on the 1st of January every year at 6pm.
/*
Execute on the first of january every year at 6pm
*/
every 01-Jan 18:00 {
}