scheduler daemon?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • adamsbarker

    #1

    scheduler daemon?

    is it possible to have a php script running as a daemon in the
    background that automatically performs something (ie, a php script)
    when a file is updated in a specific folder/directory? if not, is there
    something non-php that does this which can be set to automatically run
    a php script when a file is modified?

    thanks,
    adam.

  • Gordon Burditt

    #2
    Re: scheduler daemon?

    >is it possible to have a php script running as a daemon in the[color=blue]
    >background that automatically performs something (ie, a php script)
    >when a file is updated in a specific folder/directory?[/color]

    Command-line-only PHP does exist but it may not be present on
    hosted sites if the host didn't build it. Such a script won't
    "automatica lly perform"; it will need to check periodically and
    do something if needed.
    [color=blue]
    >if not, is there
    >something non-php that does this which can be set to automatically run
    >a php script when a file is modified?[/color]

    Cron can run a script periodically. The script still needs to check
    and do something if needed.

    Gordon L. Burditt

    Comment

    • Kenneth Downs

      #3
      Re: scheduler daemon?

      adamsbarker wrote:
      [color=blue]
      > is it possible to have a php script running as a daemon in the
      > background that automatically performs something (ie, a php script)
      > when a file is updated in a specific folder/directory? if not, is there
      > something non-php that does this which can be set to automatically run
      > a php script when a file is modified?
      >
      > thanks,
      > adam.[/color]

      got linux? check out cron.
      --
      Kenneth Downs
      Secure Data Software, Inc.
      (Ken)nneth@(Sec )ure(Dat)a(.com )

      Comment

      • Colin McKinnon

        #4
        Re: scheduler daemon?

        Gordon Burditt wrote:
        [color=blue][color=green]
        >>is it possible to have a php script running as a daemon in the
        >>background that automatically performs something (ie, a php script)
        >>when a file is updated in a specific folder/directory?[/color]
        >
        > Command-line-only PHP does exist but it may not be present on
        > hosted sites if the host didn't build it. Such a script won't
        > "automatica lly perform"; it will need to check periodically and
        > do something if needed.
        >[/color]

        Quack - oops. Thanks for playing.

        There's nothing to stop you writing a daemon in PHP. Although if it's not a
        server process I'd use cron as well.
        [color=blue][color=green]
        >>background that automatically performs something (ie, a php script)
        >>when a file is updated in a specific folder/directory?[/color][/color]

        There are some (non-PHP) tools out there which are designed for exactly this
        purpose. Some intercept the writes, some poll changes - either way, these
        might be a more sensible starting place then cron (they will (appear to)
        operate synchronously with the event). Check out dazuko, FAM and Gamin

        C.

        Comment

        • sharma

          #5
          Re: scheduler daemon?

          Hi,

          Check this tutorial...
          http://www.sitepoint.com/article/introducing-cron/

          Thanks,
          Sharma



          Comment

          Working...