(39) CentOS7でcron.dailyの実行時刻を設定
完了要件
・現在の設定を確認(何も設定されていません)
# cat /etc/crontab
・動作時刻のランダム化をしないモジュール(cronie-noanacron)をインストール
# yum install cronie-noanacron
・動作時刻のランダム化をしているモジュール(cronie-anacron)をアンインストール
# yum remove cronie-anacron
・実行時刻の設定
# vi /etc/cron.d/dailyjobs
# run-parts (ここ以下に記述されています)
15 3 * * * root [ !
-f /etc/cron.hourly/0anacron ] && run-parts /etc/cron.daily
45 3 * * 0 root [ !
-f /etc/cron.hourly/0anacron ] && run-parts /etc/cron.weekly
10 4 1 * * root [ !
-f /etc/cron.hourly/0anacron ] && run-parts /etc/cron.monthly
最終更新日時: 2023年 10月 13日(金曜日) 10:48