Download page Creating a Timed Command (Cron Replacement).
Creating a Timed Command (Cron Replacement)
You can define one or more commands which are executed at a defined time. The configuration is similar to that of a cron job. The implementation in IGEL OS uses systemd to execute the command.
To define a timed command:
In the Setup, go to System > Registry > system > cron > cronjob%
Activate enable_cron.
If you want to define paths to executables in addition to the existing path environment variable, add them under path, separated by ":".
Click Add Instance. The instance "cronjob1" is created, which will be renamed to "cronjob0" when the device has restarted.
Set the parameters for your timed command according to your needs:
command: Command to be executed. Example for testing purposes: gtkmessage -m "Here is your cron replacement"
day_of_month: Day of the month Possible values: - "1" ... "31": The command is executed on the defined day. To select a list of days for execution, enter a comma-separated list, e.g. "1,8". To enter a range of days, use a hyphen, e.g. "1-3". - "*": The command is executed every day of the month.
day_of_week: Day of a week Possible values; - "1" ... "7": The command is executed on the defined day. "0" and "7" both mean Sunday. To select a list of days for execution, enter a comma-separated list, e.g. "1,3". To enter a range of days, use a hyphen, e.g. "1-3". - "*": The command is executed every day of the week.
hour Possible values: - "0" ... "23": The command is executed in the defined hour. Example: "15" means 3 p.m, plus the minutes defined under minute. To select a list of hours for execution, enter a comma-separated list, e.g. "9,17". To enter a range of hours, use a hyphen, e.g. "9-17". - "*": The command is executed every hour.
minute Possible values: - "0" ... "59": The command is executed in the defined minute. To select a list of minutes for execution, enter a comma-separated list, e.g. "15,45". To enter a range of minutes, use a hyphen, e.g. "5-10". - "*": The command is executed every minute.
month Possible values: - "1" ... "12"; The command is executed in the defined month. To select a list of months for execution, enter a comma-separated list, e.g. "1,4". To enter a range of months, use a hyphen, e.g. "1-3". - "*": The command is executed every month.
user: The user under which the command is executed Possible options: - "root" - "user"
year: Year in 4-digit format. Example: "2019". To select a list of years for execution, enter a comma-separated list, e.g. "2019,2020". To enter a range of years, use a hyphen, e.g. "2019-2021". If the command is to be executed each year, enter "*".
Click Apply or Ok.
Restart the device. After the device has restarted, the command will be executed as configured.