Run /usr/local/sbin/weekly-backup every seven days, wait ten minutes after startup, and use job ID weekly_backup.
Which entry is appropriate?
anacrontab fields are period, delay, job identifier, and command in that order.
Detailed explanation
10 7 weekly_backup /usr/local/sbin/weekly-backupIncorrect. It reverses the period and delay fields.
Incorrect. It reverses the period and delay fields.
7 10 weekly_backup /usr/local/sbin/weekly-backupCorrect. It uses seven days, ten minutes, the ID, and the command in order.
Correct. It uses seven days, ten minutes, the ID, and the command in order.
7 weekly_backup 10 /usr/local/sbin/weekly-backupIncorrect. The delay and job-ID positions are reversed.
Incorrect. The delay and job-ID positions are reversed.
weekly_backup 7 10 /usr/local/sbin/weekly-backupIncorrect. The job ID does not come before the period.
Incorrect. The job ID does not come before the period.
Try it yourself
An example you can run in a temporary verification environment.
printf '%s
' '7 10 weekly_backup /usr/local/sbin/weekly-backup' | awk '{print $1, $2, $3}'Expected result
7 10 weekly_backupKey points
- period is days
- delay is minutes
- Job ID is unique
Notes
- Environment: POSIX awk / 模擬エントリのみ
- 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.