Schedule tag

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:

<starttime>09:00:00</starttime>

<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:

<between>
  <starttime>Mon Jan 16 09:00:00 EST 2006</starttime>
  <endtime>Mon Jan 17 09:00:00 EST 2006</endtime>
</between>

<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:

<schedule>
  <starttime>09:00:00</starttime>
  <everyhour>2</everyhour>
</schedule>

<everyminute>

Defines the interval between subsequent reports in minutes. May not be used in the same schedule as everyhour or everysecond.

<schedule>
  <everyminute>10</everyminute>
</schedule>

<everysecond>

Defines the interval between subsequent reports in seconds. May not be used in the same schedule as everyhour or everyminute.

<schedule>
  <everysecond>45</everysecond>
</schedule>

<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:

<schedule>
  <ondayofweek>Monday</ondayofweek>
  <ondayofweek>Tuesday</ondayofweek>
</schedule>

<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:

<schedule>
  <ondayofmonth>15</ondayofmonth>
</schedule>

<startdate>

The date on which the schedule becomes active. For example:

<startdate>Mon Jan 16 2006</startdate>

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>.

Notes
  • Each tag, except for the <ondayofweek> and <ondayofmonth> tags, can only be used once in a schedule.

  • The <between> tag and the individual <starttime> tag may not both be used in the same schedule.

  • Only one of <everysecond>, <everyminute>, and <everyhour> may be used in the same schedule.

Example

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>

The 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>