OpenSource For You

Descriptio­n

-

This is a numeric value, which can be specified in days only. This can be specified in minutes. After starting, Anacron waits for the ‘n' number of minutes specified as the delay parameter, before actual job execution. This is the name of the timestamps file and should be unique for each job. Before job execution, Anacron examines the timestamps file to decide whether job execution is needed or not. This field, which is self-explanator­y, can be a shell command or script.

Anacron provides a special string value that can be used in place of the period field. The currently supported value for this field is @monthly. This ensures that jobs will be executed once a month, regardless of the number of days in the current or previous month.

Anacron also allows the assignment of values to environmen­t variables in the Anacron table. Please note that Anacron tables are parsed from top to bottom; hence, any environmen­t settings are applicable only to those commands that are specified after setting environmen­t variables. By default ‘SHELL' is set to /bin/

Additional­ly, Anacron provides two more variables (given below) that control the scheduled time of the configured jobs. 1) RANDOM_DELAY: This is the maximum number of minutes that will be added to the delay field of each job. The minimum possible value for this variable is 6 minutes. Here is an example. Let us suppose the value of RANDOM_DELAY is 20 minutes and the value in the delay field is 10 minutes. Then, before job execution, Anacron will wait for 10 minutes (from the delay field) + a random number of minutes between 6-20 (because of RANDOM_DELAY). START_HOURS_RANGE: Anacron overcomes one of the major drawbacks of Cron. If an Anacron job is scheduled for a particular time interval and the system is not running at that time, Anacron guarantees that the job will be executed when the system comes up. But here is a catch. What if the system does not go offline? When should the job be executed? The solution is to specify this range by defining the START_HOURS_RANGE variable. For example, if the value of START_HOURS_RANGE is ‘1218', then Anacron jobs can be run between 12 a.m. and 6 p.m. If START_HOURS_RANGE is defined and that time interval is missed, for example, because of a power outage,

2)

Newspapers in English

Newspapers from India