Skip to content

Crontab Mask

The Crontab mask is the schedule by which ERPJS runs a maintenance from its «Scheduled» button and the tasks of the «Cron Tasks» register. It consists of five space-separated fields that define the minutes, hours, days of the month, months, and days of the week when a task should be executed. Time is counted by the server clock. Each field has its own allowed values:

  1. Minutes (0-59) — the minute of the hour.
  2. Hours (0-23) — the hour of the day.
  3. Days of the month (1-31) — the day of the month.
  4. Months (1-12) — the month of the year.
  5. Days of the week (0-6) — the day of the week, 0 is Sunday.

A field may hold * (any value), a range (1-5), a comma list (8,14) and a step (*/15 — every 15 minutes). Month and day names (jan, mon) and 7 for Sunday are not accepted by the schedule window or the task card: «Cron mask is not valid!» or «The schedule mask is not valid».

Crontab mask examples:

  1. * * * * * — This mask means the task runs every minute around the clock.

  2. 0 2 * * 1-5 — This mask specifies task execution at 2:00 AM, Monday through Friday.

  3. 30 8,14 * 3,6 1 — This mask means the task will run at 8:30 and 14:30 in March and June, only on Mondays.

  4. 0 0 1 * * — This mask runs the task at midnight (00:00) on the first day of every month.