You can optionally set up server management requests to run on a schedule. Use the following <schedule> subtags to define the schedule on which the request runs.
<schedule> subtags |
Description |
||
---|---|---|---|
<starttime> |
Defines the time of day at which the server begins generating reports. For example:
|
||
<between> |
Contains two subtags, starttime and endtime, which define an interval during which the server generates reports. May not be used in the same schedule as starttime. For example:
|
||
<everyhour> |
Defines the interval between subsequent reports in hours. May not be used in the same schedule as everyminute or everysecond. For example, the following request generates a report every two hours starting at 9 AM:
|
||
<everyminute> |
Defines the interval between subsequent reports in minutes. May not be used in the same schedule as everyhour or everysecond.
|
||
<everysecond> |
Defines the interval between subsequent reports in seconds. May not be used in the same schedule as everyhour or everyminute.
|
||
<ondayofweek> |
Each tag contains one day of the week in which the schedule is active. For example, the following schedule runs on Mondays and Tuesdays:
|
||
<ondayofmonth> |
Each tag contains one day of the month on which the schedule is active. For example, the following schedule runs on the 15th of the month:
|
||
<startdate> |
The date on which the schedule becomes active. For example:
|
To modify a schedule, register a new server management request with the same requestId. To delete a schedule, register a server
management request with the same requestId, but include the schedule tag <schedule>
none</schedule>
.
The following example creates a persistent schedule that reports on all the messages on the server including the ID and status of each message. It also overwrites any previous persistent requests assigned to the request ID dailyMessageStatus.
<?xml version="1.0" encoding="UTF-8"?> <actions> <MessageDetailsRequest> <request> <replyAddr>myclient\messageStatusQueue</replyAddr> <requestId>dailyMessageStatus</requestId> <schedule> <everyhour>24</everyhour> </schedule> <persistent/> <messageId/> <status/> </request> </MessageDetailsRequest> </actions> |
Following is an example of what the report might look like. It is sent to the address myclient\messageStatusQueue. It indicates that there are two messages on the server, one with status 60 (received) and one with status 1 (pending).
<?xml version="1.0" encoding="UTF-8"?> <MessageDetailsReport> <requestId>dailyMessageStatus</requestId> <UTCDatetime>Mon Jan 16 15:03:04 EST 2007</UTCDatetime> <statusDescription>Scheduled report</statusDescription> <messageCount>2</messageCount> <message> <messageId>ID:26080b8927f83f9722357eab0a0628eb</messageId> <status>60</status> </message> <message> <messageId>ID:fe857fa8-a7d7-4266-985b-a1818a85d1a2</messageId> <status>1</status> </message> </MessageDetailsReport> |
Send feedback about this page via email or DocCommentXchange | Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0 |