NYCPHP Meetup

NYPHP.org

[nycphp-talk] Run PHP script as service (every 10 seconds)

John Campbell jcampbell1 at gmail.com
Tue Dec 16 11:01:46 EST 2008


On Tue, Dec 16, 2008 at 9:43 AM, Fernando Gabrieli <fgabrieli at gmail.com> wrote:
> if you could change it so it runs every minute (instead of every 10 seconds)
> you could use a cron...
>

You probably want the script to run 10 seconds after it last ran to
prevent multiple instances in the case where the script takes more
than 10 seconds to run.   If you use cron, make sure you have a lock
to prevent the script from running simultaneously.

-John Campbell



More information about the talk mailing list