You can just put your entire script into a while loop the never exits. That works if it can be killed at any point. If not you may want to write some logic so it exits cleanly. If you put it in a loop I would suggest putting it into a sleep unless you need it to run non stop.
Usually the best thing to do is to not make it a daemon and put it in cron or on windows put it in scheduled tasks. I like this because it because it exits out and clears out the memory.
below is a web site with a thread that might help
Can anyone please tell what are the steps to run a perl script as a Daemon?
Can anyone please tell what are the ste
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment