Scheduled Jobs and the Scheduler Tool documentation for the dotCMS Content Management System

The Scheduler Tool allows you to schedule Quartz jobs from the dotCMS back-end UI. For a Java class to be schedulable through the Scheduler Tool, it must be a Quartz class that implements the org.quartz.Job interface.

Adding a Job

To add a job, click Add new user jobs:

Add a scheduler

You may use any name and description you like but the class needs to be the fully qualified name of the job. You need to have your job on dotCMS classpath first. You can jar it up and place it in common/lib/ext of place your class under dotCMS/WEB-INF/classes.

Select your times to execute and save.

The Job Scheduler tool allows you to both view scheduled Quartz jobs (including system jobs) and to create and manage scheduled Quartz jobs to run Java classes integrated into your dotCMS system as static or dynamic (OSGI) plugins.

The Job Scheduler tool is not included in any Tool Groups by default (and is thus not enabled for any users by default); to use the Job Scheduler tool you must add it to a Tool Group.

User Jobs

To create a User Job, click the New button.

The User Jobs tab

Creating a New Job

NameName used to identify the job; this will display in the job list.
ExecuteYou may specify a start date and time and/or end date and time to run the job.
If values are entered for this field, the Cron Expression will only be evaluated during the appropriate times.
Class to be ExecutedSelect the class to be executed from the displayed list of Quartz classes.
Cron ExpressionA cron expression specifying the specific times to run the job.

Note: The job will only be run when the times specified in both the Execute and Cron Expression fields enable the job to run.

System Jobs

The System Jobs tab shows information about all quartz jobs scheduled automatically by the dotCMS system. System jobs are automatically scheduled and managed by dotCMS; you can view information on the jobs in the Scheduler tool, but you may not make any changes to these jobs.

The System Jobs tab

Creating the Java Class

To create a Java class to run in the Job Scheduler:

  • Implement the org.quartz.Job interface in your class.
  • Create a jar containing the class.
  • Place the class jar in the WEB-INF/classes folder of your dotCMS installation (/dotserver/tomcat-X.x.xx/webapps/ROOT/WEB-INF/classes).
  • Add the class to your CLASSPATH.