My script runs every minute (with systemctl timer) but it will occasionally hang for ever, meaning that unless I manually stop it, it won't run again. So I implemented a timeout with RuntimeMaxSec
but it didn't work. (Note: I expect the script to run 1000 times ok, and maybe hang once - I'm fine with that as long as it is killed and next runs are ok)
I'm not sure what kind of signal the service received, or if it even received one. In either case, has anyone run into that issue, and what was your solution? Thanks
service:
[Unit]
Description=Run myscript
[Service]
Type=simple
ExecStart=/usr/local/bin/myscript.sh
RuntimeMaxSec=30
[Install]
WantedBy=myscript.timer
timer:
[Unit]
Description=call myscript periodically
[Timer]
OnCalendar=*-*-* *:*:30
Unit=myscript.service