MicroStrategy ONE
Create Schedule statement
Creates a schedule.
CREATE SCHEDULE schedule_name [DESCRIPTION description] [LONGDESCRIPTIONlong_description] STARTDATEstart_dateENDDATE (end_date| NEVER) TYPE (EVENTTRIGGERED EVENTNAMEevent_name| TIMETRIGGERED (DAILY EVERY (numberDAYS | WEEKDAY) | WEEKLY EVERYnumberWEEKS ONday_of_week1[,day_of_week2[,...day_of_week7]] | MONTHLY (DAYnumberOF EVERYnumberMONTHS | (FIRST | SECOND | THIRD | FOURTH | LAST) (day_of_week1|day_of_week2| ... |day_of_week7) OF EVERYnumberMONTHS) | YEARLY ((month_of_year1|month_of_year2| ... |month_of_year12)number| (FIRST | SECOND | THIRD | FOURTH | LAST) (day_of_week1|day_of_week2| ... |day_of_week7) OF (month_of_year1|month_of_year2| ... |month_of_year12))) EXECUTE (time_of_day| ALL DAY EVERY (numberHOURS |numberMINUTES |numberHOURSnumberMINUTES) [STARTTIMEtime_of_day] [ENDTIMEendtime_of_day]));
where:
-
schedule_name is the name of the schedule to be created, of type string, between double quotes (" ").
-
description is the description of the schedule, of type string, between double quotes (" ").
-
long_description is the long description of the schedule, of type string, between double quotes (").
-
start_date is the start date that determines the first day the schedule will be active, of type date (mm/dd/yyyy).
-
end_date is the end date of the schedule, of type date (mm/dd/yyyy). The schedule will never be triggered again after this date.
-
event_name is the name of the event to be linked to an event-triggered schedule, of type string, between double quotes (" "). The schedule is activated when this specific event occurs.
-
number is the number of days, weeks, months, minutes, and hours, or the number of the day within a month, to be specified for a time-based schedule, of type integer. In general this number specifies an interval, for example, every number weeks. When used with a month it can specify a specific date, for example, March number.
-
day_of_weekn is the day of the week to be specified for a time-based schedule, from the following list: SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY.
-
month_of_yearn is the month of the year to be specified for a time-based schedule, from the following list: JANUARY, FEBRUARY, MARCH, APRIL, MAY, JUNE, JULY, AUGUST, SEPTEMBER, OCTOBER, NOVEMBER, DECEMBER.
-
time_of_day is the time of the day (24-hour format) to be specified for a time-based schedule, of type time (hh:mm).
-
starttime_of_day is the time of the day (24-hour format) to be specified for starting a time-based schedule, of type time (hh:mm).
-
endtime_of_day is the time of the day (24-hour format) to be specified for ending a time-based schedule, of type time (hh:mm).
Examples
CREATE
SCHEDULE "Database Load" STARTDATE 09/10/2002 ENDDATE NEVER
TYPE EVENTTRIGGERED EVENTNAME "Database Load";
CREATE
SCHEDULE "Schedule1" STARTDATE 09/10/2002 ENDDATE NEVER TYPE
TIMETRIGGERED DAILY EVERY 5 DAYS EXECUTE 10:00;
CREATE
SCHEDULE "Schedule2" STARTDATE 09/10/2002 ENDDATE NEVER TYPE
TIMETRIGGERED DAILY EVERY WEEKDAY EXECUTE ALL DAY EVERY 5 MINUTES;
CREATE
SCHEDULE "Schedule3" STARTDATE 09/10/2002 ENDDATE NEVER TYPE
TIMETRIGGERED WEEKLY EVERY 5 WEEKS ON MONDAY, TUESDAY, WEDNESDAY EXECUTE
18:00;
CREATE
SCHEDULE "Schedule4" STARTDATE 09/10/2002 ENDDATE 09/27/02 TYPE
TIMETRIGGERED MONTHLY DAY 3 OF EVERY 5 MONTHS EXECUTE ALL DAY EVERY 5
HOURS START AFTER MIDNIGHT 10 MINUTES;