2012年1月25日

CentOS6でcron.dailyの設定を行う

CentOS6で /etc/crontab を確認すると、下記のような記述となっています。

SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# For details see man 4 crontabs

# Example of job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * user-name command to be executed

確認してみたところ、cron.daily等の設定が記述されていません。

cron.daily等の設定をするには、下記をインストールします。

onie-noanacron

そして、下記をアインストールする必要があります。

cronie-anacron

上記を行うと、下記で設定を行うことが可能になります。

/etc/cron.d/dailyjobs
/etc/cron.d/0hourly


こちらの記事はなかの人(be_hase)監修のもと掲載しています。
元記事は、こちら

お問い合わせはこちらから

  • お問い合わせ

0 コメント:

コメントを投稿