Linux

cron vs anacron

🐧 Yon 2024. 1. 10. 15:29
λ°˜μ‘ν˜•
기쑴의 λ¦¬λˆ…μŠ€ μ‹œμŠ€ν…œμ—μ„œ crontab은 /etc/cron.* 및 μ„œλΈŒ 디렉토리에 μœ„μΉ˜ν•œ job 정보λ₯Ό ν¬ν•¨ν•˜κ³  μžˆμ—ˆμœΌλ©° 머신이 싀행쀑일 λ•Œλ§Œ μ˜ˆμ•½λœ job듀이 μœ νš¨ν•˜κ²Œ μ‹€ν–‰λ˜λŠ” κ΅¬μ‘°μ˜€λ‹€. ν˜„λŒ€μ μΈ λ¦¬λˆ…μŠ€ μ‹œμŠ€ν…œμ—μ„œ μ‚¬μš©λ˜λŠ” `anacron` 은 기쑴의 `cron`을 λŒ€μ²΄ν•˜λ©° μ‹œμŠ€ν…œμ΄ κΊΌμ Έ μžˆμ—ˆλ”λΌλ„ μ‹œμŠ€ν…œ λΆ€νŒ… μ‹œκ°„κ³Ό λ§ˆμ§€λ§‰ μž‘μ—… μ‹œκ°„μ„ κ³ λ €ν•˜μ—¬ λΆ€νŒ…λœ μ΄ν›„λ‘œ μ˜ˆμ•½λœ μ‹œκ°„μ΄ 지났닀면 ν•΄λ‹Ή μž‘μ—…μ„ μ‹€ν–‰ν•œλ‹€.

package name
- anacron
key configuration file
- `/etc/anacrontab`

anacrontab ꡬ성 νŒŒμΌμ€ μ•„λž˜μ™€ κ°™λ‹€.

# /etc/anacrontab: configuration file for anacron

# See anacron(8) and anacrontab(5) for details.

SHELL=/bin/sh
HOME=/root
LOGNAME=root

# These replace cron's entries
1       5       cron.daily      run-parts --report /etc/cron.daily
7       10      cron.weekly     run-parts --report /etc/cron.weekly
@monthly        15      cron.monthly    run-parts --report /etc/cron.monthly

 

λ°˜μ‘ν˜•