A module for scheduling jobs using the Quartz Scheduler
scheduler:delete-scheduled-job($job-name as xs:string) as xs:boolean
Delete the named job named from the Scheduler. Will only delete User Scheduled Jobs! Returns true if the Job was deleted.
$job-name | The name of the job to be deleted |
scheduler:get-scheduled-jobs() as node()
Gets the details of all scheduled jobs in the form: <scheduler:jobs xmlns:scheduler="http://exist-db.org/xquery/scheduler" count="iJobs"> <scheduler:group name="group"> <scheduler:job name=""> <scheduler:trigger name=""> <expression></expression> <state></state> <start></start> <end></end> <previous></previous> <next></next> <final></final> </scheduler:trigger> </scheduler:job> </scheduler:group></scheduler:jobs>
scheduler:pause-scheduled-job($job-name as xs:string) as xs:boolean
Pause the named job in the scheduler. Will only pause user scheduled jobs!
$job-name | The name of the job in the scheduler |
scheduler:resume-scheduled-job($job-name as xs:string) as xs:boolean
Resumes the named job in the scheduler. Will only resume user scheduled jobs!
$job-name | The name of the job to resume. |
scheduler:schedule-java-cron-job($java-classname as xs:string, $cron-expression as xs:string, $job-name as xs:string) as xs:boolean
Schedules the Java Class named (the class must extend org.exist.scheduler.UserJavaJob) according to the Cron expression. The job will be registered using the job name.
$java-classname | The full name of the class to be executed. It must extend the org.exist.scheduler.UserJavaJob class. |
$cron-expression | The cron expression. Please see the scheduler documentation. |
$job-name | The name of the job. |
scheduler:schedule-java-cron-job($java-classname as xs:string, $cron-expression as xs:string, $job-name as xs:string, $job-parameters as element()?) as xs:boolean
Schedules the Java Class named (the class must extend org.exist.scheduler.UserJavaJob) according to the Cron expression. The job will be registered using the name passed in $job-name. The final argument can be used to specify parameters for the job, which will be passed to the query as external variables. Parameters are specified in an XML fragment with the following structure: <parameters><param name="param-name1" value="param-value1"/></parameters>.
$java-classname | The full name of the class to be executed. It must extend the org.exist.scheduler.UserJavaJob class. |
$cron-expression | The cron expression. Please see the scheduler documentation. |
$job-name | The name of the job. |
$job-parameters? | The XML fragment with the following structure: <parameters><param name="param-name1" value="param-value1"/></parameters> |
scheduler:schedule-java-periodic-job($java-classname as xs:string, $period as xs:integer, $job-name as xs:string, $job-parameters as element()?, $delay as xs:integer, $repeat as xs:integer) as xs:boolean
Schedules the Java Class named (the class must extend org.exist.scheduler.UserJavaJob) according to the periodic value. The job will be registered using the job name. The $job-parameters argument can be used to specify parameters for the job, which will be passed to the query as external variables. Parameters are specified in an XML fragment with the following structure: <parameters><param name="param-name1" value="param-value1"/></parameters>, Given the delay and the repeat.
$java-classname | The full name of the class to be executed. It must extend the org.exist.scheduler.UserJavaJob class. |
$period | Time in milliseconds between execution of the job |
$job-name | The name of the job. |
$job-parameters? | The XML fragment with the following structure: <parameters><param name="param-name1" value="param-value1"/></parameters> |
$delay | The period in milliseconds to delay the start of a job. |
$repeat | The number of times to repeat the job after the initial execution. A value of -1 means repeat forever. |
scheduler:schedule-xquery-cron-job($xquery-resource as xs:string, $cron-expression as xs:string, $job-name as xs:string) as xs:boolean
Schedules the named XQuery resource (e.g. /db/foo.xql) according to the Cron expression. XQuery job's will be launched under the guest account initially, although the running XQuery may switch permissions through calls to xmldb:login(). The job will be registered using the job name. Jobs submitted via this function are transitory and will be lost on a server restart. To ensure the persistence of scheduled tasks add them to the conf.xml file.
$xquery-resource | The path to the XQuery resource |
$cron-expression | The cron expression. Please see the scheduler documentation. |
$job-name | The name of the job. |
scheduler:schedule-xquery-cron-job($xquery-resource as xs:string, $cron-expression as xs:string, $job-name as xs:string, $job-parameters as element()?) as xs:boolean
Schedules the named XQuery resource (e.g. /db/foo.xql) according to the Cron expression. XQuery job's will be launched under the guest account initially, although the running XQuery may switch permissions through calls to xmldb:login(). The job will be registered using the job name. The final argument can be used to specify parameters for the job, which will be passed to the query as external variables. Parameters are specified in an XML fragment with the following structure: <parameters><param name="param-name1" value="param-value1"/></parameters> Jobs submitted via this function are transitory and will be lost on a server restart. To ensure the persistence of scheduled tasks add them to the conf.xml file.
$xquery-resource | The path to the XQuery resource |
$cron-expression | A cron expression. Please see the scheduler documentation. |
$job-name | The name of the job. |
$job-parameters? | XML fragment with the following structure: <parameters><param name="param-name1" value="param-value1"/></parameters> |
scheduler:schedule-xquery-cron-job($xquery-resource as xs:string, $cron-expression as xs:string, $job-name as xs:string, $job-parameters as element()?, $unschedule as xs:boolean) as xs:boolean
Schedules the named XQuery resource (e.g. /db/foo.xql) according to the Cron expression. XQuery job's will be launched under the guest account initially, although the running XQuery may switch permissions through calls to xmldb:login(). The job will be registered using the job name. The job parameters argument can be used to specify parameters for the job, which will be passed to the query as external variables. Parameters are specified in an XML fragment with the following structure: <parameters><param name="param-name1" value="param-value1"/></parameters> Jobs submitted via this function are transitory and will be lost on a server restart. To ensure the persistence of scheduled tasks add them to the conf.xml file.
$xquery-resource | The path to the XQuery resource |
$cron-expression | A cron expression. Please see the scheduler documentation. |
$job-name | The name of the job. |
$job-parameters? | XML fragment with the following structure: <parameters><param name="param-name1" value="param-value1"/></parameters> |
$unschedule | Specifies whether to unschedule this job if an XPathException is raised, default is true. |
scheduler:schedule-xquery-periodic-job($xquery-resource as xs:string, $period as xs:integer, $job-name as xs:string, $job-parameters as element()?, $delay as xs:integer, $repeat as xs:integer) as xs:boolean
Schedules the named XQuery resource (e.g. /db/foo.xql) according to the period. XQuery job's will be launched under the guest account initially, although the running XQuery may switch permissions through calls to xmldb:login(). The job will be registered using the job name. The job parameters argument can be used to specify parameters for the job, which will be passed to the query as external variables. Parameters are specified in an XML fragment with the following structure: <parameters><param name="param-name1" value="param-value1"/></parameters>, Given the delay passed and the repeat value. Jobs submitted via this function are transitory and will be lost on a server restart. To ensure the persistence of scheduled tasks add them to the conf.xml file.
$xquery-resource | The path to the XQuery resource |
$period | Time in milliseconds between execution of the job |
$job-name | The name of the job. |
$job-parameters? | XML fragment with the following structure: <parameters><param name="param-name1" value="param-value1"/></parameters> |
$delay | Can be used with a period in milliseconds to delay the start of a job. |
$repeat | Number of times to repeat the job after the initial execution. A value of -1 means repeat forever. |
scheduler:schedule-xquery-periodic-job($xquery-resource as xs:string, $period as xs:integer, $job-name as xs:string, $job-parameters as element()?, $delay as xs:integer, $repeat as xs:integer, $unschedule as xs:boolean) as xs:boolean
Schedules the named XQuery resource (e.g. /db/foo.xql) according to the period. XQuery job's will be launched under the guest account initially, although the running XQuery may switch permissions through calls to xmldb:login(). The job will be registered using the job name. The job parameters argument can be used to specify parameters for the job, which will be passed to the query as external variables. Parameters are specified in an XML fragment with the following structure: <parameters><param name="param-name1" value="param-value1"/></parameters>, Given the delay passed and the repeat value. Jobs submitted via this function are transitory and will be lost on a server restart. To ensure the persistence of scheduled tasks add them to the conf.xml file.
$xquery-resource | The path to the XQuery resource |
$period | Time in milliseconds between execution of the job |
$job-name | The name of the job. |
$job-parameters? | XML fragment with the following structure: <parameters><param name="param-name1" value="param-value1"/></parameters> |
$delay | Can be used with a period in milliseconds to delay the start of a job. |
$repeat | Number of times to repeat the job after the initial execution. A value of -1 means repeat forever. |
$unschedule | Specifies whether to unschedule this job if an XPathException is raised, default is true. |