I need run a script which for marked records in one table creates "indexing" or "helpers" records in another table.
This script should:
- switch this activity and sleep(10) /should sleep after it will not find any marked record/
- run always
- run in 1 instance only /to avoid indexing of same records from 2 instances/
I decide to solve it as systemd service.
My QUESTION IS: Is this good decision, or should I use something web2py specific (scheduler?) ?
-----------------
If somebody is interested in the "systemd service" solution, I made in based on this article:
...and I have added into the [service] section: Restart=on-failure