Jump to content

Archived

This topic is now archived and is closed to further replies.

makeshift_theory

php "constantly running" question

Recommended Posts

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.

Share this post


Link to post
Share on other sites
personally i'd just start a cron job to run every minute or so, depending on how often you want it to run.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.