Is there a setting in systemd to restart a service automatically after e.g. 24 hours?
Or what is the best workaround to implement such a function?
Background: I have a difficult-to-identify flaw in my long-running web-harvesting and storing-into-DB code. It does work for 10 or 20 days, then it is suddenly halting, until we reset it manually. Even excessive logging has given me no idea yet where exactly the problem is coming from. Of course, I would rather like to solve the underlying problem, but (for economic reasons) a brute-force kill-and-restart would probably also do the trick.
EDIT: I seem to have finally found the real flaw - an internet query for which I did not (could not) set a timeout (because the read_json function did not allow that option). Have now solved it via socket.setdefaulttimeout(...) - and I hope that will solve that infrequent halting problem itself. Thanks for your help!