in reply to How to Write a Proper Daemon
Your question aside, you might want to rethink this. Unless there's substantial overhead that you avoid by running a persistent process (say there's some startup cost to computing the existing statistics state that you want to keep updated), what exactly do you think moving away from a cron'd solution is gaining you? You could always just have the cron'd code check for the server at the same interval and just exit if the CS server's not runnng. You get the same benefit (the stats aren't run unless the server's up) and less work (cron just works and is something you don't have to maintain).
|
|---|