XQuery Function Documentation
http://exist-db.org/xquery/scheduler
java:org.exist.xquery.modules.scheduler.SchedulerModule
A module for scheduling jobs using the Quartz Scheduler
scheduler:delete-scheduled-job
Delete the named job named from the Scheduler. Will only delete User Scheduled Jobs! Returns true if the Job was deleted.
- Parameters:
-
$job-name The name of the job to be deleted - Returns:
- xs:boolean : a boolean value indicating success or failure on deleting the named job.
scheduler:get-scheduled-jobs
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>
- Returns:
- node() : the XML containing the list of jobs
scheduler:pause-scheduled-job
Pause the named job in the scheduler. Will only pause user scheduled jobs!
- Parameters:
-
$job-name The name of the job in the scheduler - Returns:
- xs:boolean : the success of the pausing of the named job
scheduler:resume-scheduled-job
Resumes the named job in the scheduler. Will only resume user scheduled jobs!
- Parameters:
-
$job-name The name of the job to resume. - Returns:
- xs:boolean : the indicator of successful resumption
scheduler:schedule-java-cron-job
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.
- 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. - Returns:
- xs:boolean : a flag indicating successful execution
scheduler:schedule-java-cron-job
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>.
- 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> - Returns:
- xs:boolean : a flag indicating successful execution
scheduler:schedule-java-periodic-job
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.
- Parameters:
-
$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. - Returns:
- xs:boolean : a flag indicating successful execution
scheduler:schedule-xquery-cron-job
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.
- Parameters:
-
$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. - Returns:
- xs:boolean : a flag indicating successful execution
scheduler:schedule-xquery-cron-job
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>
- Parameters:
-
$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> - Returns:
- xs:boolean : Flag indicating successful execution
scheduler:schedule-xquery-cron-job
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>
- Parameters:
-
$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. - Returns:
- xs:boolean : Flag indicating successful execution
scheduler:schedule-xquery-periodic-job
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.
- Parameters:
-
$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. - Returns:
- xs:boolean : Flag indicating successful execution
scheduler:schedule-xquery-periodic-job
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.
- Parameters:
-
$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. - Returns:
- xs:boolean : Flag indicating successful execution