M
M
marataziat2017-02-12 08:48:27
linux
marataziat, 2017-02-12 08:48:27

How to make a daemon for Python?

I am making a site monitoring service, for this I need the server to cycle all the time.
Is there any way to make the script continue to run after restarting the python VM?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Mindlin, 2017-02-12
@kgbplus

Add a run command (only with full paths and &) to the /etc/rc.local file and remember that from this file the script will be executed as root
/usr/bin/python /home/user/prog.py &

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question