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

Re: Re: triggering a program in web server

by tja_ariani (Acolyte)
on Aug 18, 2003 at 10:41 UTC ( #284533=note: print w/replies, xml ) Need Help??


in reply to Re: triggering a program in web server
in thread triggering a program in web server

Hi,

you're rite, I was thinkin to have the program run as a daemon, but I do not know how to do the scheduling part.
Is there any simple program or piece of code as an example to show how to do this ?

I was thinkin using infinite loop in the program to check, but will it slow down the server ?
Or is there any command to 'sleep' the program periodically ?

Thanks

  • Comment on Re: Re: triggering a program in web server

Replies are listed 'Best First'.
Re: Re: Re: triggering a program in web server
by valdez (Monsignor) on Aug 18, 2003 at 10:55 UTC

    A possible approach is: every time a file is uploaded you put a link to that file in a special directory; then every n seconds (via cron or using sleep) you check the directory, move new files and delete links.

    HTH, Valerio

Re: Re: Re: triggering a program in web server
by bm (Hermit) on Aug 18, 2003 at 10:49 UTC
    I was thinkin to have the program run as a daemon, but I do not know how to do the scheduling part.

    Take a look at Net::Daemon . But I can't see the advantage of running this as a daemon is (the small performance gain of not loading Perl?).
    --
    bm

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2022-09-25 17:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer my indexes to start at:




    Results (116 votes). Check out past polls.

    Notices?