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 書き方 備忘録

Last updated at Posted at 2022-12-01

記述方法

crontab -e
-e 編集

# 分 時 日 月 曜日 ユーザ コマンド

#毎分実行
*/1 * * * * python3 /home/user/test.py

RedHat系の Linuxでは、このファイルを直接編集することは推奨されていないため、定期的に実行したいコマンドについては「cron.monthly」、「cron.weekly」、「cron.daily」、「cron.hourly」配下のファイル、または、crontabコマンドを用いて、「/var/spool/cron/user」ファイルに設定を行ないます。
https://www.express.nec.co.jp/linux/distributions/knowledge/system/crond.html

cronファイルの監視

tail -f /var/log/cron
-f ファイル名

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?