Poor Man's Service: Difference between revisions

From Nottinghack Wiki
Jump to navigation Jump to search
Created page with "Ever want to run a permanent restarting service on a Unix machine as a non-root user? I often use a screen + cron recipe to run long-lived processes where cron checks to see if ..."
(No difference)

Revision as of 22:09, 19 June 2011

Ever want to run a permanent restarting service on a Unix machine as a non-root user?

I often use a screen + cron recipe to run long-lived processes where cron checks to see if it's running, restarting it if it isn't, and screen provides a handy detached interface to stdin/stdout etc.

So, let's call this service "service1" and make cron run a script every five minutes to check that it's OK...

 0,5,10,15,20,25,30,35,40,45,50,55 * * * *       /home/michael/service1/check