Database Reference
In-Depth Information
Figure 16-4. Dashboard Scheduler application, showing scheduled jobs
XQuery Jobs
Writing user jobs in XQuery that are executed periodically by the scheduler is not
much different from writing normal XQuery. The scheduler can execute only
XQuery main modules—that is, it cannot directly call a specific XQuery function—
but this should not be a problem as you can always write a one-line XQuery main
module that acts as a wrapper for your library function.
Sometimes you need to be able to parameterize an XQuery that the scheduler will
execute, perhaps with some configuration settings. The scheduler fits well with the
standard mechanism for passing external configuration into XQuery, which is to use
variable declarations with external binding. In the configuration of the XQuery
scheduled job, you may set parameters, each of which will attempt to bind to the
equivalently named external variable declared in your XQuery. By default, the exter‐
nal variables are expected to be bound to the local namespace of the XQuery and use
 
Search WWH ::




Custom Search