Forums

Small process all day long... most effective way?

Hey there, I want to setup a small website monitoring script, that will have a look at say 4 pages of our webshop and send warnings out, if the site is down/database failures etc. What would be the smallest footprint for that? I don't want to use all of my cronjobs for it on the one hand, or all my cpu minutes on the other hand. Would I write a script and let it time.sleep(120)? Or will it drain my cpu-minutes?

Thanks!

Hi ace, sleep doesn't use cpu cycles. I would write a script that checks if an instance of it is already running, if it is running it does not start. This way it will start up again if it dies for some reason.

Thanks Hansel, good idea, will write a script and hook it to a cronjob like you said.