Allow anacron jobs to start only from 06:00 through 22:00.
Which setting is appropriate?
START_HOURS_RANGE=6-22 restricts the hours in which anacron may start jobs.
Detailed explanation
RANDOM_DELAY=6-22Incorrect. RANDOM_DELAY is the random extra delay in minutes.
Incorrect. RANDOM_DELAY is the random extra delay in minutes.
SHELL=6-22Incorrect. SHELL names the command interpreter.
Incorrect. SHELL names the command interpreter.
PATH=6-22Incorrect. PATH controls command lookup directories.
Incorrect. PATH controls command lookup directories.
START_HOURS_RANGE=6-22Correct. It sets the allowed start-hour range.
Correct. It sets the allowed start-hour range.
Try it yourself
An example you can run in a temporary verification environment.
printf '%s
' 'START_HOURS_RANGE=6-22' | cut -d= -f2Expected result
6-22Key points
- Start-hour range
- Separate from delay
- Jobs outside the range wait
Notes
- Environment: POSIX cut / 模擬設定のみ
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.