Unix:カテゴリー
cron(クロンの設定)
定期的にコマンドを実行したい場合は、
cronを使います。
crontab -e とすると、viが起動して、
corを編集できます。
#crontab -e
50 03 * * * /usr/bin/test.sh
分、時、日、月、曜日の順にtab区切りで時間を指定し、
指定したプログラムやコマンドを実行します。
●cron の起動方法
# /etc/rc.d/init.d/crond start
crond を起動中: [ OK ]
●cron の再起動方法
# /etc/rc.d/init.d/crond restart
crond を停止中: [ OK ]
crond を起動中: [ OK ]
●cron の停止方法
# /etc/rc.d/init.d/crond stop
crond を停止中: [ OK ]
●電源をONしたとき、cronが自動起動するか確認
# chkconfig --list crond
crond 0:off 1:off 2:on 3:on 4:on 5:on 6:off
3:onなので、自動起動する。
電源の起動は、↓を参照
http://www.searchman.info/fedoracore4/sev1040.html
ユーザーの追加
# /usr/sbin/useradd -s /sbin/nologin ユーザーID
# passwd ユーザーID
パスワード入力画面
# passwd ユーザーID
パスワード入力画面
Page:
1