0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

cronの基本コマンド

Posted at

cronとは

多くのUNIX系OSで標準的に利用される常駐プログラム(デーモン)の一つ。
設定したスケジュールに従って指定されたプログラムを定期的に起動してくれる。

コマンド

crontabファイルの内容を表示

$ crontab -l

crontabファイルを編集

$ crontab -e

(※viエディタが開くので編集)

crontabの書式

# 「分」「時」「日」「月」「曜日」「コマンド」を半角スペース区切りで書く
# 毎月1日、15日の3:30に/home/test01/test.shのシェルスクリプトを実行する場合
30 3 1,15 * * /home/test01/test.sh

ログの確認

$ less /var/log/cron
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?