E
E
Enlighted_one2021-04-26 22:24:00
Python
Enlighted_one, 2021-04-26 22:24:00

How to run a python script via cron?

Good day to all.
Wrote a small python script and made it run with a command from the console:
/var/prog/runner.py I

write to cron:
* 5 * * * /var/prog/runner.py

No startup occurs. Nothing interesting in the logs either:

Apr 26 22:20:01 248709 CRON[18658]: (root) CMD (/var/prog/runner.py)
Apr 26 22:20:03 248709 CRON[18657]: (CRON) info (No MTA installed, discarding output)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
ky0, 2021-04-26
@Enlighted_one

Add the path to the interpreter binary.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question