Scheduler cron information and examples

Polarion uses cron - a time-based job scheduling utility that enables Polarion administrators to schedule jobs to run periodically at specified times, dates, or intervals. This topic provides basic information and usage examples that may be helpful when configuring scheduled jobs.

Job scheduling

The following table contains examples of cron expressions used in job scheduling.

Expression

Meaning

0 0 12 * * ?

Fire at 12pm (noon) every day.

0 15 10 ? * *

Fire at 10:15 am every day.

0 15 10 * * ?

Fire at 10:15am every day.

0 15 10 * * ? *

Fire at 10:15am every day.

0 15 10 * * ? 2006

Fire at 10:15am every day during the year 2006.

0 * 14 * * ?

Fire every minute starting at 2 pm (14:00) and ending at 2:59 pm (14:49), every day.

0 0/5 14 * * ?

Fire every 5 minutes starting at 2 pm (14:00) and ending at 2:55 pm (14:55), every day.

0 0/5 14,18 * * ?

Fire every 5 minutes starting at 2 pm (14:00) and ending at 2:55 pm (14:55), AND fire every 5 minutes starting at 6 pm (18:00) and ending at 6:55 pm (18:55), every day.

0 0-5 14 * * ?

Fire every minute starting at 2 pm (14:00) and ending at 2:05 pm (14:05), every day.

0 10,44 14 ? 3 WED

Fire at 2:10 pm (14:10) and at 2:44 pm (14:44) every Wednesday in the month of March.

0 15 10 ? * MON-FRI

Fire at 10:15 am every Monday, Tuesday, Wednesday, Thursday and Friday.

0 15 10 15 * ?

Fire at 10:15 am on the 15th day of every month.

0 15 10 L * ?

Fire at 10:15am on the last day of every month.

0 15 10 ? * 6L

Fire at 10:15am on the last Friday of every month.

0 15 10 ? * 6L 2003-2006

Fire at 10:15 am on every last Friday of every month during the years 2003, 2004, 2005 and 2006.

0 15 10 ? * 6#3

Fire at 10:1 5am on the third Friday of every month.

History Indexing job

he DB History Creator job indexes the embedded SQL database layer, updating it with the most current history data from the repository.

History Indexing's performance has been greatly enhanced and now runs automatically.

(It can still be suspended, or resumed from the Monitor.)

Administrators that would like to have the job run periodically, at a scheduled time, can remove the disabled="false" property from the Cron Scripts via the

Scheduler.

Set the History Indexing job to run periodically:

To start the job at 7pm (Monday to Friday):

<job name="Resume DB History Creator" id="polarion.jobs.db.history" disabled="false" cronExpression="0 0 19 ? * MON-FRI" scope="system"/>  

To stop the job at 8am (Monday to Friday):

<job name="Suspend DB History Creator" id="polarion.jobs.db.history.killer" cronExpression="0 0 8 ? * MON-FRI" scope="system"/>