This question has already been answered:

There is ubuntu 14.04 x64. Problem:

It is necessary to restart the service (in my case, service tor) every (for example) 10 minutes. At the same time, he himself never falls and always works. But sometimes it simply stops issuing new IPs (it is treated by rebooting: service tor restart)

Tell me how to set up auto-restart?

Reported as a duplicate by user194374, aleksandr barakin , Community Spirit 4 Dec '16 at 7:39 .

A similar question was asked earlier and an answer has already been received. If the answers provided are not exhaustive, please ask a new question .

1 answer 1

Cron? https://ru.wikipedia.org/wiki/Cron Try this one. mh dom mon dow user command 17 * * * * root cd / && run-parts --report /etc/cron.hourly 25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ) 47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly ) 52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )