in reply to Re^2: Perl daemon ?
in thread Perl daemon ?

Consider using daemontools (see also thedjbway). They are essentially while(1) on steroids, completely eliminating any need to have daemon management, configuration, or logging code in your code. With daemontools, a simple daemon does not need more than 10 lines of shell code.

And by the way: If a daemon like cron crashes and is not restarted automatically, either the machine's hardware or the OS setup is severely broken.

What you you need the background process for? For some routine task that has to be done every N time-units? That's clearly a job for cron. No need to re-invent wheels, just wake up your lazy admin. Or do you need some service that responds to requests that may happen at any time? That's a job for a dedicated daemon, preferably under control of daemontools.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Replies are listed 'Best First'.
Re^4: Perl daemon ?
by newbie01.perl (Sexton) on Nov 27, 2009 at 10:06 UTC

    Hi Alexander,

    Right you are, wake up my lazy SA's ... :-) I wish I could. Believe it or not, they are not even alerted when their cron daemon dies ... ouch

    Thanks for the tips