linux - How can I configure a systemd service to restart periodically? -


i have simple systemd service needs periodically restarted keep process bugging out. there configuration option systemd services periodically restart them? of restart* options seem pertain restarting service when exits.

yes, can make service restart periodically making service of type=notify. add option in [service] section of service file along restart=always , give watchdogsec=xx, xx time period in second want restart service. here process killed systemd after xx time period , restarted systemd again. eg.

[unit] . .  [service] type=notify . . watchdogsec=10 restart=always . .  [install] wantedby= .... 

Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -