I
I
Ivan Yakushenko2019-04-30 16:54:02
Python
Ivan Yakushenko, 2019-04-30 16:54:02

How to set up a Python script to autorun and restart it in case of an error?

CentOS 7. The usual console application in Python: there is a separate file in which the launch parameters are written and the main method is called, it is necessary that this file starts itself in case of restarting the OS. How can this be done?
Even in case of an error, the application stops working with the words:

Process finished with exit code 1

Can I somehow track this so that after an error, immediately restart the script, or can this be done in Python itself?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir, 2019-04-30
@vintello

yes, the question has been asked many times. supervisord answer

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question