First let's familiarize ourselves with the terms related to this subject.

"Cron" is a time-based job scheduler in the camera Linux operating system. The entries in this schedule become a cron task table in the camera application folder. The file is named ttcron.

There is a cron "daemon" that runs on the systems. A daemon is a program that runs in the background all the time, usually initiated by the system. This cron daemon is responsible for launching these cron jobs on schedule.

Here is a simple cron job:

There are two main parts:

  1. The first part is "10 * * * *". This is where we schedule the timer.
  2. The rest of the line is the command as it would run from the command line.
  3. Only the timer values are shown for editing. The command details are always the same.

This is the working part of the cron job string, as mentioned above. It determines how often and when the cron job is going to run.

It consists of five parts:

  1. minute
  2. hour
  3. day of month
  4. month
  5. day of week

Here is an illustration:

Quite often, you will see an asterisk (*) instead of a number. This represents all possible numbers for that position. For example, asterisk in the minute position would make it run every minute.

Note that the "day of month" and "day of week" are used as inclusive OR fields. "* 1 20 * 5" runs on the 20th of each month, but also runs every Friday.

We need to look at a few examples to fully understand this Syntax.

This cron job will run every minute, all the time:

This cron job will run at minute zero, every hour (i.e. an hourly cron job):

This is also an hourly cron job but run at minute 15 instead (i.e. 00:15, 01:15, 02:15 etc.):

This will run once a day, at 2:30am:

This will run once a month, on the second day of the month at midnight (i.e. January 2nd 12:00am, February 2nd 12:00am etc.):

This will run on Mondays, every hour (i.e. 24 times in one day, but only on Mondays):

You can use multiple numbers separated by commas. This will run three times every hour, at minutes 0, 10 and 20:

Division operator is also used. This will run 12 times per hour, i.e. every 5 minutes:

Dash can be used to specify a range. This will run once every hour between 5:00am and 10:00am:

>