crontabにyum-cronを追加する必要がありますか?

crontabにyum-cronを追加する必要がありますか?

コンテンツ/etc/sysconfig/yum-cron:

15:14:57 # vim /etc/sysconfig/yum-cron

# if MAILTO is set and the mail command is available, the mail command
# is used to deliver yum output

# by default MAILTO is unset, so crond mails the output by itself
# example:  MAILTO=root
[email protected]

# you may set SYSTEMNAME if you want your yum emails tagged differently
SYSTEMNAME="UHSPAASTREAM06"

# you may set DAYS_OF_WEEK to the days of the week you want to run
# default is every day
DAYS_OF_WEEK="12345"

# which day should it do cleanup on?  defaults to 0 (Sunday).  If this day 
isn't in the
# DAYS_OF_WEEK above, it'll never happen
CLEANDAY="2"

# set to yes to make the yum-cron service to wait for transactions to 
complete
SERVICE_WAITS=yes

# set maximum time period (in seconds) for the yum-cron service to wait for
# transactions to complete.  The default is 300 seconds (5 minutes)
SERVICE_WAIT_TIME=300

毎週午前11時にyum-cronを実行したいです。時間を指定できる場所はどこにもありません。クローンタブを作成する必要がありますか?

ベストアンサー1

インストールすると、yum-cron以下に関連する新しいファイルが生成されます。cron/etc/cron.daily/0yum-daily.cron/etc/cron.hourly/0yum-hourly.cron

システムにこのyum-utilsパッケージが含まれている場合は、どのファイルが含まれているかを確認できますrepoquery -l yum-cron。このコマンドは、次のコードスニペットのような出力を提供します。

/etc/cron.daily/0yum-daily.cron
/etc/cron.hourly/0yum-hourly.cron
/etc/yum/yum-cron-hourly.conf
/etc/yum/yum-cron.conf
/usr/lib/systemd/system/yum-cron.service
/usr/sbin/yum-cron
/usr/share/doc/yum-cron-3.4.3
/usr/share/doc/yum-cron-3.4.3/COPYING
/usr/share/man/man8/yum-cron.8

すぐに我々はマニュアルが何を言っているのかを見ることができますman yum-cron。基本的にそれほど多くはありません。構成ファイルがコマンドラインパラメーターを介して使用されることを示します。

各ディレクトリ、、、/etc/cron.dailyおよび/etc/cron.weeklyは、/etc/cron.monthly定期的に実行する必要があるスクリプトを保存するためのものですcron。各サイクルの正確な時間は、cron次のコマンドをcat /etc/anacrontab使用して構成ファイルを読み取って表示できます。サーバーが多いですcron。私は使用しますanacron。さまざまなパッケージが利用可能ですcron

cronしたがって、いいえ。ジョブがすでに存在するため、ジョブを作成する必要はありません。一人でできる…

  • cron基本スケジュールの承諾
  • 基本cronスケジュールを変更するか、
  • クローンジョブを削除しyum-cronて独自のジョブを作成しますcroncrontab -e)。

おすすめ記事