The following tutorial shows you how to create a new CRON job and which parameters are available to you.
-
In LANconfig, open the configuration for your device.
-
Open the Cron table in the dialog and click Add... to create a new CRON job.
-
Enter a time base.
The time base determines whether LCOS performs the timing of future actions based on the real time or the uptime of the device. With the setting Real time, the system evaluates time and dates. With the setting Operating time, the system evaluates only the minutes and hours since the device was last started.
-
The value for Variation specifies the maximum delay in minutes for the start of the CRON job after the specified start time.
The device determines the actual delay time at random. It lies between 0 and the time entered here. With the variation set to zero the CRON job will be executed at the specified time.
Note: Rules based on real-time can only be executed if the device has a time from a valid source, e.g. via NTP.
-
Enter the minute(s), hour(s), day(s) of the week, day(s) of the month and the month(s) when your device should execute the specified command.
If you do not enter a value, your device ignores the corresponding value. For each parameter you can optionally specify a comma-separated list of values or a range of values (in the form of
<Min.>-<Max.>).
The syntax of the field Days of week corresponds to the usual CRON interpretation:
Sunday |
Monday |
Tuesday |
Wednesday |
Thursday |
Friday |
Saturday |
0 |
1 |
2 |
3 |
4 |
5 |
6 |
Note: The day-of-the-week field is also significant for rules relating to the operating time. This is useful for actions that you perform only once when you start the device (i.e., with zero days uptime). In this way you can match the day of the week to the days of operating time, for example.
-
Under Commands you enter the command or a comma-separated list of commands.
Any command-line function can be executed.
-
Specify the Owner of the CRON job.
An owner is able to select an administrator defined in the device. If an owner is specified, then the CRON job commands will be executed with the rights of the owner.
-
A brief description of the CRON job can be entered in the Comment field.
-
Click OK to save the entry. You then write the configuration back to the device.
Other configuration examples:
Time base
|
At least
|
Hr.
|
W. days
|
M. days
|
Months
|
Command
|
Real time
|
0
|
4
|
0-6
|
1-31
|
1-12
|
do /so/man/disconnect internet
|
Real time
|
59
|
3
|
0-6
|
1-31
|
1-12
|
mailto:admin@example.com?subject=Forced-disconnect?body=Manual Internet discconnect
|
Real time
|
0
|
0
|
|
1
|
|
do /setup/accounting/delete
|
Real time
|
0
|
18
|
1,2,3,4,5
|
|
|
do /so/man/connect MAINOFFICE
|
- The first entry disconnects from the ISP every morning at 04:00h (forced disconnect).
- The second entry sends a brief e-mail to the admin each morning at 03:59h, just before the forced disconnect.
- The third entry deletes the accounting table on the 1st day of each month.
- The fourth entry establishes a connection to the main office each weekday at 18:00h.
Important: The device executes scheduled rules with an accuracy of one minute. Please ensure that the language you use to enter commands matches with that set for the console, otherwise scheduler commands will be ignored.