E
E
eujob2021-11-02 18:31:27
Task Schedulers
eujob, 2021-11-02 18:31:27

Reloading python script every hour. How to implement it?

How to implement a script reload every hour? There is no way to monitor him 24/7. Sometimes it crashes and closes. I implemented a bat file, but it did not help, after several reboots, cmd just stands still.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Karabanov, 2021-11-02
@karabanov

Run the script via supervisor or SystemD - there you can configure auto-restart, including in case of a crash.

U
UMFUCHI, 2021-11-02
@UMFUCHI

Look, here's what you can do from a crash: take 'while True', inside this loop is a 'try' block, in which the body of the program, and in except throw 'continue'.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question