Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Scheduling without cron or modules

by bean (Monk)
on Aug 10, 2003 at 08:29 UTC ( [id://282580]=note: print w/replies, xml ) Need Help??


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"...

Replies are listed 'Best First'.
282597
by Samn (Monk) on Aug 10, 2003 at 11:20 UTC
        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

    Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Domain Nodelet?
    Node Status?
    node history
    Node Type: note [id://282580]
    help
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this?Last hourOther CB clients
    Other Users?
    Others taking refuge in the Monastery: (5)
    As of 2024-04-24 18:37 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found