I have a service running on a *nix server. It sometimes crashes randomly which is too complicated to investigate right now, instead I just restart it from time to time:
service <servicename> restart
How do I make it restart automatically once a day?
I tried adding a job to the crontab:
0 0 * * * root service <servicename> restart
or
0 0 * * * root /usr/sbin/service <servicename> restart
but that doesn’t seem to do the job.
New contributor
Pavel Emelianov is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.