You are not logged in.

#1 2012-06-09 19:45:45

korkadapa
Member
Registered: 2008-08-27
Posts: 32

Anacron: Why the RANDOM_DELAY?

I'm planning to use anacron for a backup solution. However, when I tried it out today I got aware of RANDOM_DELAY. My initial though was to set it to zero, but I figured that it might have some sort of purpose that I'm not aware of.

I guess my question is, why would I want to wait a random amount of time after my computer boots to execute jobs? Is it perfectly safe to set RANDOM_DELAY to 0?

Offline

#2 2012-06-09 19:52:52

Terminator
Member
From: Belgium
Registered: 2012-05-07
Posts: 265

Re: Anacron: Why the RANDOM_DELAY?

Google says:

The next two lines are variables that modify the time for each scheduled job. The RANDOM_DELAY variable denotes the maximum number of minutes that will be added to the delay in minutes variable which is specified for each job. The minimum delay value is set, by default, to 6 minutes. A RANDOM_DELAY set to 12 would therefore add, randomly, between 6 and 12 minutes to the delay in minutes for each job in that particular anacrontab. RANDOM_DELAY can also be set to a value below 6, or even 0. When set to 0, no random delay is added. This proves to be useful when, for example, more computers that share one network connection need to download the same data every day. The START_HOURS_RANGE variable defines an interval (in hours) when scheduled jobs can be run. In case this time interval is missed, for example, due to a power down, then scheduled jobs are not executed that day.

edit: The text is a bit misleading I think, the bold part probably explains why a random delay might be usefull, not why setting it to 0 may be usefull.

So you can safely put it to 0.

Last edited by Terminator (2012-06-09 19:55:19)

Offline

#3 2012-06-09 20:04:38

korkadapa
Member
Registered: 2008-08-27
Posts: 32

Re: Anacron: Why the RANDOM_DELAY?

Terminator wrote:

Google says:

The next two lines are variables that modify the time for each scheduled job. The RANDOM_DELAY variable denotes the maximum number of minutes that will be added to the delay in minutes variable which is specified for each job. The minimum delay value is set, by default, to 6 minutes. A RANDOM_DELAY set to 12 would therefore add, randomly, between 6 and 12 minutes to the delay in minutes for each job in that particular anacrontab. RANDOM_DELAY can also be set to a value below 6, or even 0. When set to 0, no random delay is added. This proves to be useful when, for example, more computers that share one network connection need to download the same data every day. The START_HOURS_RANGE variable defines an interval (in hours) when scheduled jobs can be run. In case this time interval is missed, for example, due to a power down, then scheduled jobs are not executed that day.

edit: The text is a bit misleading I think, the bold part probably explains why a random delay might be usefull, not why setting it to 0 may be usefull.

So you can safely put it to 0.

I see. Thanks!

Offline

Board footer

Powered by FluxBB