Scheduling Jobs Using CronSchedules.xml (Alternative Approach)

The Scheduler framework reads information that you specify in the CronSchedules.xml file. The schema for the CronSchedules.xml file is located in the $MQ_HOME\schema\config\scheduler\1.0\CronScheduler.xsd folder.

Procedure

  1. Navigate to the $MQ_HOME/config folder.
  2. Open the CronSchedules.xml file.
  3. Specify the following properties in the CronSchedules.xml file:
    Property Name Description
    Job Specify the job name. You can include more than one job. For example, Future Effective Date job, Scheduler Duplicate Detection job, or an email job.
    Job Details Specify the Java class for a job in which the functionality is implemented. For example,
    • For Future Effective Date job: com.tibco.mdm.infrastructure.scheduler.FEDScheduler
    • For Scheduler Duplicate Detection job: com.tibco.dq.scheduler.DuplicateDetectionJob
    Trigger Expression In the Scheduler utility, the job and trigger time are defined using the cron trigger expression. Based on this cron trigger expression, the job is invoked. A job can contain more than one trigger expressions. For example, if a job is to be scheduled on weekly basis or on month end, two expressions can be configured for a single job.

    Example, Cron Trigger Expression:

    An expression to create a trigger that fires every five minutes:

    <TriggerExpression>0 0/5 * * * ?</TriggerExpression>
    0 0/5 * * * ? represents Seconds Minutes Hours Day-of-Week Year

    ? is for no specific value. For more information on special characters and configuring cron expressions, refer to http://www.quartz-scheduler.org/documentation/quartz-2.2.x/tutorials/tutorial-lesson-06.html

    You can specify two types of trigger expressions:

    • Simple Trigger Expression: Specifies that the first three digit of a expression does not include a comma, slash (/), or hyphen. If the application server instance is out of time synchronization with the Database server, then the TIBCO MDM server tries to adjust the Simple trigger expression to nullify the time difference. Use the simple trigger expression to synchronize the database and application server time.

      For example, if the database server time is 2:50PM and application server time is 3:00PM, then TIBCO MDM server fires the job at 3:10PM according to the TIBCO MDM application server time as it equals to 3:00PM on the database server.

      Previous trigger expression: 0 50 14 * * ? (Fires everyday, as signified by the ?, at 2:50PM, in effect the time component is 14:50:00 IST 2011)

      Modified trigger expression: 0 00 15 * * ? (Fires everyday, as signified by the ?, at 3:00 PM, in effect the time component is 15:00:00 IST 2011)

      Note: If the time difference leads to date change, then use the TIBCO MDM application server time. For example, the trigger expression is 0 59 23 2/5 * ? . In this case, the difference is in milliseconds 60000. Hence, the modified trigger expression is 0 60 23 2/5 * ? that changes to the next date.
    • Complex Trigger Expression: Specifies that the first three digit of a expression includes a comma, slash (/), and hyphen. You can use the complex trigger expression in cases such as if you want the job to be executed for every five minutes, every one hour, or after every 8-10 minutes. For example,

      For every five minutes: 0 0/5 * * * ?

      After every 8-10 minutes: 0 8-10 * * * ?

      For every one hour: 0 0 0/1 * * ?

    Job Policy The job policy is defined inside the JobInput properties. The job policy is optional for a job. If a job is dependent on some inputs, such as Enterprise Name or User Name, decisions are taken based on some requirements such as matching attributes or work items of two persons. All such inputs are defined in an XML file and passed using the job policy. For example, the sample MatchRecordRule.xml file is provided in the $MQ_COMMON_DIR\samples\DQ process folder. You must copy it to the $MQ_COMMON_ DIR\enterprise-internal-name\rulebase folder. The schema for the MatchRecordRule.xml is located in the $MQ_HOME\schema\config\scheduler\1.0\MatchRecordRule.xsd folder.
    ExecuteonStartup By default, the value is false. To run the scheduler, specify the value as true.
  4. Save the CronSchedules.xml file.