Sybase Adaptive Server Anywhere Reference page 456

Table of Contents

Advertisement

CREATE EVENT statement
438
SCHEDULE clause
This clause specifies when scheduled actions are to
take place. The sequence of times acts as a set of triggering conditions for the
associated actions defined in the event handler.
You can create more than one schedule for a given event and its associated
handler. This permits complex schedules to be implemented. While it is
compulsory to provide a schedule-name when there is more than one
schedule, it is optional if you provide only a single schedule.
When a non-recurring scheduled event has passed, its schedule is deleted, but
the event handler is not deleted.
Scheduled event times are calculated when the schedules are created, and
again when the event handler completes execution. The next event time is
computed by inspecting the schedule or schedules for the event, and finding
the next schedule time that is in the future. If an event handler is instructed to
run every hour between 9:00 and 5:00, and it takes 65 minutes to execute, it
runs at 9:00, 11:00, 1:00, 3:00, and 5:00. If you want execution to overlap,
you must create more than one event.
The subclauses of a schedule definition are as follows:
START TIME
The first scheduled time for each day on which the event
is scheduled. If a START DATE is specified, the START TIME refers
to that date. If no START DATE is specified, the START TIME is on
the current day (unless the time has passed) and each subsequent day.
BETWEEN ... AND
no scheduled times occur. If a START DATE is specified, the scheduled
times do not occur until that date.
EVERY
An interval between successive scheduled events. Scheduled
events occur only after the START TIME for the day, or in the range
specified by BETWEEN ... AND.
ON
A list of days on which the scheduled events occur. The default is
every day. These can be specified as days of the week or days of the
month.
Days of the week are Monday, Tuesday, and so on. The abbreviated
forms of the day, such as Mon, Tue, and so on, may also be used.
Days of the month are integers from 0 to 31. A value of 0 represents the
last day of any month.
The date on which scheduled events are to start
START DATE
occurring. The default is the current date.
Each time a scheduled event handler is completed, the next scheduled time
and date is calculated.
A range of times during the day outside of which

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Adaptive Server Anywhere and is the answer not in the manual?

Questions and answers

Table of Contents