|
Example: |
The QuerySchedule, taken literally, specifies the exact timing of query execution down to the second. In practice, an implementation may not wish to or may not be able to honor that request precisely, but can honor the general intent. For example, a QuerySchedule may specify that a query be executed every hour on the hour, while an implementation may choose to execute the query every hour plus or minus five minutes from the top of the hour.
Example 1 QuerySchedule second = 0 minute = 0 all other fields omitted This means run the query once per hour, at the top of the hour. If the reportIfEmpty argument to subscribe is false, then this does not necessarily cause a report to be sent each hour a report would be sent within an hour of any new event data becoming available that matches the query.
Example 2 QuerySchedule second = 0 minute = 30 hour = 2 all other fields omitted This means run the query once per day, at 2:30 am.
Example 3 QuerySchedule second = 0 minute = 0 dayOfWeek = [1-5] This means run the query once per hour at the top of the hour, but only on weekdays.
Example 4 QuerySchedule hour = 2 all other fields omitted This means run the query once per second between 2:00:00 and 2:59:59 each day. This example illustrates that it usually not desirable to omit a field of finer granularity than the fields that are specified. |
|
|