This is an internal documentation. There is a good chance you’re looking for something else. See Disclaimer.
Quartz Scheduler¶
Manually scheduling a task¶
While batch-jobs are scheduled automatically, other background tasks (like sending mails) need to be scheduled using the TaskSchedulingService.
jobClass
is the class of the task that should be executed
taskName
is the name of the job (used to beTaskData#setName()
)
taskType
should be a validCallable_type
jobData
is the equivalent ofTaskData
. This data is persisted and available during task execution. The data is serialized using Xstream (as before) and supports custom data (putString()
andputObject()
) and also contains some methods to configure the environment (putPrincipal()
andputBusinessUnit()
).
executionDate
point of time when the job should be started
Tests¶
Tests for batch-jobs can be easily migrated to EasyBatchjobTestCase.
See Batchjob Testing section.
Startup behaviour¶
ch.tocco.nice2.enableUpgradeMode=true¶
During the database upgrade, the scheduler is completely disabled. It is not possible execute any tasks and batch jobs will not be synchronized with the database.
UPDATE run environment¶
During the UPDATE environment, the scheduler is started, but all batch-job triggers will be paused.
However explicitly submitted jobs will still be executed. The same behaviour can be achieved using
the ch.tocco.nice2.tasks.disable.persistent.task.scheduling
property.