PDA

View Full Version : Keep perl script running w/ cron



Sunlis
03-23-2010, 07:50 PM
I have a Perl script for an XMLSocket server, and I use 'nohup' in SSH so that I don't have to stay connected for the server to be running. What I'm wondering is this: Is there a simple shell script or something that I can run every... 10 or 20 minutes with a cron job that will check to see if server.pl is running, and either start it up, or do nothing?

I'd be shocked if it wasn't out there somewhere, but I just can't come up with the right combination of search terms to find it. (I don't know much about shell script, or perl for that matter)

Thanks!

atoms
04-19-2010, 10:20 AM
I don't think you can leave a permanent process running. The rules may have changed when the current CPU throttling measures were implemented though. You might want to see if what you want to do is allowed before you bother trying to make it work.