in reply to [untitled node, ID 282518]
I like the "cron in perl" idea offered in a previous post, but either of your solutions could be made much less wasteful with the simple addition of only having a 1 in N chance of firing. In your case, N might be somewhere around 800 - it would go off ~100 times a day, which should be often enough. The thing I don't like about the "monitor.cgi" idea is the name - it implies that you're planning on running it as a cgi (which I don't think will work, because IIRC cgi's terminate if the client disconnects/times-out). A script that runs all the time is a daemon (so it would be "monitor.pl") - and if it's robust enough, it shouldn't need monitoring. So, we're back to the "cron in perl"...
282597
by Samn (Monk) on Aug 10, 2003 at 11:20 UTC
|
| [reply] |
|
I'd just like to point out that webhosting providers often somehow check for processes that are running for too long (suspecting that they are daemons, which are usually not allowed), and kill them.
this might be a problem if your pseudo-cron sleeps() for hours at a time in the background, i guess, and severly limit the 'ease of installation' factor...
just my two centimos, YMMV
| [reply] |
|