Cronjobs are tasks handled by the firewall or the Control Center at designated times or intervals via a process called crond. A task must be defined as a reference to a script. Since scripts are located in directories, the reference to the script comprises both the path to it and the name of it. The exact time when a special task is to be executed must be specified by minute, hour, month, and year. Additional information is necessary regarding whether the task must be executed either at a single point in time, at multiple points in time, or periodically.
How Cronjobs Are Handled by the Firewall or the Control Center
Cronjobs are handled based on time information stored in a table on system level, the so-called crontab. You must configure an entry that comprises all necessary information about a cronjob. After it is saved, the system schedules the information for execution at the time provided.
Schedule Parameters store information for the execution of scripts. This information is stored in variables that are preset by default on the firewall for a correct execution of system-specific tasks. The variables can be referenced by their name and a prepended $. Usually, it is not necessary to modify the settings of these variables:
LOGCONF – By default, this variable holds the path to the file logstore.conf and describes how log files are treated.
MAILTO – (Optional) An email address that specifies a recipient who will be notified when the script is executed.
SHELL – The instance that is responsible for executing the script. The default value is set to /bin/bash.
Configure a schedule entry with the following:
Description – A descriptive name for the task.
Command – The full path, including the name of the script to execute.
Timebase – The time frame (day, month, week, year) to which the scheduled information refers to:
Daily / Weekly / Monthly / Yearly Schedule
List – You can configure comma-separated values as a list, e.g.
2, 7
.
These two values have different meanings depending on the following categories:Minute List – On every second and seventh minute of an hour.
Hour List – At 2 a.m. and 7 a.m.
Day List – On the second and seventh day of the week.
Month List – On the first of February and of July.
Every – You can configure a period of time by a number. Enter the value in Run Every .. Minutes / Hours / Weekday / Day of the Month / Month. Accepted values range from 2 to 12.
Schedule entries are stored along different time frames. The following options are provided:
Daily Schedule – Opens the section to configure cronjobs that are run on an hourly and daily basis.
Monthly Schedule – Opens the section to configure cronjobs that are run on a weekly and monthly basis.
Yearly Schedule – Opens the section to configure cronjobs that are run on a yearly basis.
In Advanced View, you can configure schedule entries without the limitation of the the regular Daily/Monthly/Yearly Schedule templates:
Generic Schedule – Opens the section to configure cronjobs that are run on a customized basis. Configuring cronjobs in this section requires a basic understanding of standard crontab syntax.
You can check the result of a cronjob by entering the Unix command in a shell: cat /phion0/logs/box_System_cron.log
For more information, see How to Configure a Cronjob.
For an example, see Example - Create box.par Archive Files Using a Cronjob at Regular Intervals