LoginSignup
1
0

More than 5 years have passed since last update.

crond 設定

Posted at

環境

CentOS release 6.7 (Final)

インストール

# yum install crontabs

確認

# service crond status

起動

# service crond start

自動起動設定

設定を確認

# chkconfig --list | grep crond
crond 0:off 1:off 2:off 3:off 4:off 5:off 6:off

すべてoffは自動起動off
crond を自動起動に設定します。

# chkconfig --level crond on

再度設定を確認します。

# chkconfig --list | grep crond
crond 0:off 1:off 2:on 3:on 4:on 5:on 6:off

crontab 設定

# crontab -e

分 時 日 月 曜日 コマンド

設定可能な数値

設定項目 数値
0-59
0-23
1-31
1-12
曜日 0-7 0=日、1=月、2=火、3=水、4=木、5=金、6=土、7=日

実行時間指定方法

指定方法 設定例 説明
リスト 0,10,20,30 分フィールド指定した場合は0,10,20,30分に実行します。
範囲 1-5 月フィールドで指定した場合、1,2,3,4,5月に処理を実行します。
共存 1,6,9-11 時間フィールドで指定した場合、1時、6時、9時、10時、11時に処理を実行します。
間隔 */10 分フィールドで指定した場合、10分間隔で処理を実行します。「/」の後ろに指定した値の間隔で処理を実行します。
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0