Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » QAnywhere » QAnywhere Transmission and Delete Rules » Rule syntax

Rule syntax Next Page

Schedule syntax

Schedule syntax

schedules : { AUTOMATIC | schedule-spec ,... }

schedule-spec :
{ START TIME start-time | BETWEEN start-time AND end-time }
[ ON { ( day-of-week, ... ) | ( day-of-month, ... ) } ]
[ START DATE start-date ]


You can create more than one schedule for a given condition. This permits complex schedules to be implemented.

A schedule specification is recurring if its definition includes EVERY or ON; if neither of these reserved words is used, the schedule specifies at most a single time. An attempt to create a non-recurring schedule for which the start time has passed generates an error.

Each time a scheduled time occurs, the associated condition is evaluated and then the next scheduled time and date is calculated.

The next scheduled time is computed by inspecting the schedule or schedules, and finding the next schedule time that is in the future. If a schedule specifies every minute, and it takes 65 seconds to evaluate the conditions, it runs every two minutes. If you want execution to overlap, you must create more than one rule.

  1. If the EVERY clause is used, find whether the next scheduled time falls on the current day, and is before the end of the BETWEEN ... AND range. If so, that is the next scheduled time.

  2. If the next scheduled time does not fall on the current day, find the next date on which the event is to be executed.

  3. Find the START TIME for that date, or the beginning of the BETWEEN ... AND range.

The QAnywhere schedule syntax is derived from the SQL Anywhere CREATE EVENT schedule syntax.

Keywords are case insensitive.

See also

The following sample server transmission rules file applies to the client identified by the client message store ID sample_store_id. It creates a dual schedule: high priority messages are sent once an hour. The schedule is every 1 hours and the condition is ias_priority=9. Also, between the hours of 8 A.M. and 9 A.M., high priority messages are sent every minute.

; This rule governs when messages are transmitted to the client
; store with id sample_store_id.
   every 1 hours = ias_priority=9
   between 8:00 and 9:00 every 1 minutes = iasPriority=9