I'd like to trigger a script to update some statistics when a user submits a new record, but I don't want the user to have to wait for the script to finish before being redirected.
>-- Time -->
> redirect User -> User Does Stuff -> more stuff -> etc
/
User Input -> Submit ->
\
> updating stats in background -> Possibly still running
What's the best way to do this in PHP?
EDIT for Fabrik
Users would like to see immediate feedback reflecting the addition of their new data, but this new data only comes in 2 or 3 times a day, so I think an interval-based CRON job might be an unnecessary use of server resources and also fail to satisfy their need for urgency. Hope this helps!