Database Reference
In-Depth Information
"0 0 0/1 * * ?" ,
"hourly-weather" ,
<parameters>
<param name = " city " value = " Exeter " />
<param name = " country " value = " United Kingdom " />
<param name = " weather-collection " value = " /db/weather " />
</parameters>
)
Java system task job
It is unlikely that most developers will ever implement system task jobs, as you can
meet the vast majority of use cases by instead implementing a user job. However,
should you want to implement a scheduled system task job in Java, you do not
actually need to implement the scheduler job aspect. Instead, you can just implement
org.exist.storage.SystemTask , as eXist provides a generic system task job
org.exist.scheduler.impl.SystemTaskJobImpl that enables any system task to be
scheduled.
Remember that when your system task runs, you have exclusive
access to the database, as the database will be in protected mode.
All other operations will be blocked until your task completes .
Accordingly, you should ensure that your task executes quickly and
efficiently!
When implementing org.exist.storage.SystemTask , you must implement the fol‐
lowing configuration functions:
/**
* Called to configure the system task.
* Enables you to configure your system task!
* Note: If the system task is managed by the scheduler,
* this happens before scheduling.
*
* @param config A reference to the parsed in-memory
* representation of eXist's configuration file $EXIST_HOME/conf.xml.
* @param properties A property set containing any parameters passed
* to the scheduled job.
*
* @throws EXistException You may throw this to abort configuration of
* the system task. If the task is managed by the scheduler,
* it will not be scheduled.
*/
void configure ( Configuration config , Properties properties )
throws EXistException ;
/**
* Indicates whether a checkpoint should be generated
* before the execute function is called. A checkpoint
* guarantees that any outstanding changes are flushed to
Search WWH ::




Custom Search