"cron.monthly"クローンジョブはいつ実行されますか?

yumアップデートを毎月実行したかったのですが、今は実際に毎日実行されています。

からに0yum-cron移動できますか?それでは、その月のどの日に実行されるのか、どうすればわかりますか?cron.dailycron.monthly

ベストアンサー1

合理的な範囲内で、および間cron.hourlycron.daily必要なものを移動できます。cron.weeklycron.monthly

ただし、パッケージマネージャ(yumなど)がインストールした設定ファイルを削除/移動すると、将来のシステムアップグレード時に設定ファイルを再度追加しようとする可能性があります。したがって、移動するときにその場所に空のファイルを残すことをお勧めします。これが後でyumが上書きされるのを防ぐことができることを保証することはできません。

通常、タイミングは項目で構成されます/etc/crontab。そこに何も見つからない場合は、ファイルを確認してください。/etc/cron.d

たとえば、デフォルトのcrontabはubuntuサーバーに設定され、次のように指定します。

# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# m h dom mon dow user  command
17 *    * * *   root    cd / && run-parts --report /etc/cron.hourly
25 6    * * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6    * * 7   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6    1 * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )

したがって、私のサーバーは毎月1日rootに/etc/cron.monthlyスクリプトを実行します。6:52

おすすめ記事