Answer the question
In order to leave comments, you need to log in
How to run python script automatically?
Hello. Faced with a problem. After rebooting the server, the python script does not start.
I registered it in rc.local, also in supervizor.
After the reboot, the process can be found with
ps aux | grep prog
There is a pid, running as root. But there are no signs of life. Axis centos 6.
Answer the question
In order to leave comments, you need to log in
Use cron .
The @reboot construct is used to run the cron script after the server is rebooted. Add to our crontab:
@reboot sh /path/to/your/your_program
Example with a delay of 60 seconds:
@reboot /bin/sleep 60 ; sh /path/to/your/your_program
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question