Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Newest Node alert

by blokhead (Monsignor)
on Apr 06, 2009 at 15:44 UTC ( #755768=note: print w/ replies, xml ) Need Help??


in reply to Newest Node alert

Following What XML generators are currently available on PerlMonks?, you may want to use a URL like:

http://www.perlmonks.org/?node_id=30175;types=perlquestion;days=0.0034 +7
This will only look for nodes created in the last 0.00347 days, which is 5 minutes (the amount of time your script sleeps between polls). It's a little unnecessary load on the server, perhaps, to fetch the information for the older irrelevant nodes. Also, it eliminates the need to store a "last seen" node ID.

I also notice that your script will not announce more than one node if multiple new nodes show up in the same 5 minute window.

blokhead


Comment on Re: Newest Node alert
Download Code
Re^2: Newest Node alert
by lakshmananindia (Chaplain) on Apr 07, 2009 at 04:15 UTC

    Thanks blokhead for your suggestion. I understood the days=. I'll try that. Its only the start. I'll find a way to make my script to announce, if more than one node is posted within 5 minutes. Thanks a lot for your suggestion.

    --Lakshmanan G.

    The great pleasure in my life is doing what people say you cannot do.


Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2015-07-05 16:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (67 votes), past polls