cron
定期実行処理
ユーザ名指定して編集([]は不要)
# crontab -u[name] -e
setting
- 1 2 3 4 5 command
- 1:分
- 2:時間
- 3:日にち
- 4:月
- 5:曜日(0:日曜日 6:土曜日)
- command:実行コマンド
- 1 2 3 4 5 command
change editor to vim
temporary
# export EDITOR=vim
eternal (add ~/.bashrc)
export EDITOR=vim
escape
* * * * * /opt/scripts/test.sh >> /opt/script/test.`date +\%Y\%m\%d`.log 2>&1