Disabling cron tasks for a server bundle
Active cron tasks run on all servers in a sequence. In you have multiple server bundles, you can disable a cron task instance on one or more of the bundles to reduce the workload on the bundles.
About this task
You can prohibit all or a selected set of instances from running by modifying the bundleLevelProperties property when you deploy the application. You can use a combination of system properties to run a cron task on a server bundle, and exclude a particular instance of that cron task.
For example, the ReorderCronTask and the PMWoGenCronTask are process-intensive. To reduce the workload on a server bundle, you can disable these two cron tasks on that bundle.
If the mxe.crontask.dorun property is left empty, all cron tasks run except for those specified on the mxe.crontask.donotrun property.
If the same cron task is specified on both the mxe.crontask.dorun property and on the mxe.crontask.donotrun property, the mxe.crontask.donotrun property takes priority, and the cron task will not run.
Procedure
- In the Server bundles section of the deployment panel, select View in the Additional properties column.
- In the Bundle level properties section of the Additional server bundle properties window, click Add property.
- Specify the appropriate property name, for example mxe.crontask.donotrun.
- Specify a value for the bundle-level property in the format
crontaskname.instancename
, where crontaskname is the name of the cron task and instancename is the name of the cron task instance.For example, if you want to disable a cron task instance on a server bundle, specify mxe.crontask.donotrun for the property name and specify a property value such as ReorderCronTask.ReorderCronTask01. - To implement your changes, redeploy the server bundle.