makeshift_theory Posted October 25, 2006 Share Posted October 25, 2006 Sorry didn't know a better subject line first off....Secondly here is the situation, I have written a php application that will watch different ports on my home server and display whether they are off or on, so I can check the status of my server at all times. However I would like to implement some new functionality into this but I would like some opinions first. The new functionality I would like to add is if a particular service goes down say Proftpd which is on port 21, I want it to send me an e-mail saying that service is down. Now I know how to code all of that fine however I would for the script to "run on it's own." The only two ways I can see doing this are to add a refresh on the page and keep it open at all times or create a shell script to open the page every so often. I would like you guy's opinion on it before I attempt anything. BTW I write on Linux so I can't do batch files, I use sh. Quote Link to comment https://forums.phpfreaks.com/topic/25077-php-constantly-running-question/ Share on other sites More sharing options...
.josh Posted October 25, 2006 Share Posted October 25, 2006 personally i'd just start a cron job to run every minute or so, depending on how often you want it to run. Quote Link to comment https://forums.phpfreaks.com/topic/25077-php-constantly-running-question/#findComment-114296 Share on other sites More sharing options...
makeshift_theory Posted October 25, 2006 Author Share Posted October 25, 2006 That's pretty much the exact words my co-worker said, I suppose that's probably going to be the best option. Thanks a bunch. Quote Link to comment https://forums.phpfreaks.com/topic/25077-php-constantly-running-question/#findComment-114338 Share on other sites More sharing options...
SieRobin Posted October 25, 2006 Share Posted October 25, 2006 Cron jobs is your only other option, lol. Quote Link to comment https://forums.phpfreaks.com/topic/25077-php-constantly-running-question/#findComment-114344 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.