S
S
shish72021-04-18 11:23:39
linux
shish7, 2021-04-18 11:23:39

Why doesn't crontab start python?

Normal python(a) program to check if Cron(a) is working. I run
it every minute...
But CRON does not run the program... Runs
from console.
Help, please, I've already broken my head ...
607bec62c5c0c800050453.png
607bec6919815094195340.png
607bec6fcd5be501194159.png
607bec75d3ea5805572733.png

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
alegzz, 2021-04-18
@alegzz

which python3.9
output is the path to the python, this command must be written in the cron

K
ky0, 2021-04-18
@ky0

And where is your user from under which you need to run the script? Or, if this is not a crontab, but someone's personal cron (in which the user does not need to be specified for obvious reasons) - does this "someone" have access to the directory /rootand the script itself?

S
shish7, 2021-04-18
@shish7

607bf3bdbbf3d536215897.png
And so, it seemed to be decided ........
With such an entry in the KRON
*/1 * * * * /usr/local/bin/python3.9 /root/2.py &

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question