Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Execute code after session expire

by sundialsvc4 (Monsignor)
on Apr 24, 2014 at 11:45 UTC ( #1083568=note: print w/ replies, xml ) Need Help??


in reply to Execute code after session expire

Remember that a web-server, alone, only reacts to incoming HTML messages as they arrive.   It processes them to produce an HTML response, then forgets all about it.   If not one single HTML message came to that server during the next hour, say, then that HTML server would never run at all for that entire hour.   If nothing referencing that particular session-id came through, the session record would probably never be touched.

Hence, the need for cron jobs, or some equivalent scheduled mechanism, which will cause a response to occur at or near the appointed time, even if there is no HTML activity.   Certainly, things like “deleting files” ought to be done in this way.   For one thing, deleting files takes time that a very busy HTML-server ought not to spend.   Also, HTML-servers often run with almost-no filesystem permissions at all, to minimize the dangers associated with intrusion.   The HTML-server might well be given permission to read a selected directory of files, but not to create, delete, or modify any of its content.


Comment on Re: Execute code after session expire
Re^2: Execute code after session expire
by Anonymous Monk on Apr 24, 2014 at 12:25 UTC
Re^2: Execute code after session expire
by hominid (Curate) on Apr 24, 2014 at 13:23 UTC
    Please stop posting.
Re^2: Execute code after session expire
by karlgoethebier (Curate) on Apr 24, 2014 at 13:31 UTC

    See also this.

    «The Crux of the Biscuit is the Apostrophe»

Re^2: Execute code after session expire
by sundialsvc4 (Monsignor) on Apr 24, 2014 at 16:01 UTC

    You may, of course, presume that where I said HTML, I clearly meant HTTP.   I really don’t think that this needed to be clarified.   Now, folks, the only reason why someone opens a thread on a forum is to get an answer to his question or a solution to his problem.   If the response is technically incomplete or incorrect, address the response but ignore the respondent.   Please stay on-point.   If what you have to say is merely that you don’t like someone-else who posted a response to the same thread, and wish that he would just go away so that you can pleasantly hear only yourselves talk, then, “we already know that, so please don’t.”   (Maybe he doesn’t like you too much, either, and I frankly don’t want to read such garbage in any thread anywhere.   Everyone has a nose and an opinion, but I usually don’t want to read what comes from either one.)   That sort of thing is not advancing the conversation at hand, or the purpose of the site.

      " I really don.t think that this needed to be clarified." But you came her eto do that any way. "Now, folks, the only reason why someone opens a thread on a forum is to get an answer to his question or a solution to his problem" You fail to provider either, just post after post of nonsense. " If the response is technically incomplete or incorrect, address the response but ignore the respondent." You ignore anyone who proves you are wrong. " That sort of thing is not advancing the conversation at hand, or the purpose of the site. " Nor does any of your input here.

      You made the error before and were corrected. You did not fix that node, or even acknowledge the correction. Instead, you repeated the exact same error in the above node, and you haven't corrected that node either.

      Experienced monks obviously know you meant HTTP, but people asking questions here may not. Does a misleading answer that sounds knowledgeable "advance the purpose of the site"?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (9)
As of 2014-08-22 10:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (153 votes), past polls