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