LoginSignup
0
0

More than 1 year has passed since last update.

cronって、シンボリックリンクを認識しないの?

Posted at

OSのリプレースのため、ubuntuサーバーを立ち上げてcronセッティングしていた昼下がり。

0 20 * * * python /home/ore/Documents/py/soft.py

普通に単純にcronを記述して、完璧に動作されるはずだった。
しかし動作しない。

・soft.py(動作させたいファイル)のパーミッションの問題?
・cronのパーミッションの問題?
・ファイルパス指定の間違い?

悩んだ結果、「python」コマンドを「python3.8」と書き換えたら解決した。

0 20 * * * python3.8 /home/ore/Documents/py/soft.py

はじめのコードで記述したpythonは、
/usr/bin/python3.8のシンボリックリンクである。

これをそのまま本体のpython3.8に書き換えただけ。
今までも当然のようにシンボリックリンクで指定していた気がしたけどなぁ。

やっぱ、シンボリックリンクが原因なの?

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