../../_images/savapage-logo-no-text-100px.png

15. Job Scheduling

SavaPage background jobs are scheduled with Cron Trigger Format expressions.

15.1. Cron Trigger Format

Cron Trigger Format is similar to GNU/Linux cron scheduling expressions. An extensive tutorial can be found here, and a simplified introduction is presented in this section.

A Cron Trigger is an expression comprised of 6 mandatory fields separated by white space.

Cron Trigger Format - simplified

Field Name

Range

Special

Remark

Seconds

0-59

, - *

Not relevant in our case: can be zero

Minutes

0-59

, - *

Hours

0-23

, - *

Day of month

1-31

, - * ?

Month

1-12

, - *

Range is identical to JAN-DEC.

Day of week

1-7

, - * ?

Range is identical to SUN-SAT.

Note: GNU/Linux cron uses range 0-6.

Special character values are:

  • , : used to specify additional values. For example, 2,4,6 in the day-of-week field means the days Monday, Wednesday, and Friday.

  • - : used to specify ranges. For example, 2-6 in the day-of-week field means the days Monday to Friday.

  • * : used to select all values within a field. For example: * in the Hours field means “every hour”.

  • ? : used to select no specific value. This is useful when you need to specify something in one of the two fields in which the character is allowed, but not the other. For example :

    • If you want a trigger to fire on a particular day of the week (say, Sunday), but don’t care what day of the month that happens to be, you would put 1 in the day-of-week field, and ? in the day-of-month field.