-
cuba.schedulingActive application property should be set to
true
prior to server startup to enable tasks processing. -
For the ad hoc tasks processing management,
app-core.cuba:type=Scheduling
JMX bean can be used. ItsActive
attribute enables tasks processing for the current session of the server. After restarting the server, the processing will be started only if the cuba.schedulingActive application property is set totrue
. -
All changes to tasks made via system screens take effect immediately for all servers in the cluster.
The removeExecutionHistory()
method of the app-core.cuba:type=Scheduling
JMX bean can be used to remove old execution history. The method has two parameters:
-
age
– the time (in hours) elapsed after the task execution. -
maxPeriod
– the maximumPeriod
(in hours) for tasks that should have their execution history removed. This allows removing the history for frequently run tasks only, while keeping the history for tasks executed once a day.
The method can be invoked automatically. Create a new task with the following parameters:
-
Bean name –
cuba_SchedulingMBean
-
Method name –
removeExecutionHistory(String age, String maxPeriod)
-
Method parameters – for example,
age = 72
,maxPeriod = 12
.