php - Best ways in which to conduct background tasks -


using php, want have scheduled tasks based upon time server running.

say @ 7pm on sunday want database query ran.

the way in i've considered doing put task in script ran on each page load in session init.

any ideas?

one method automatically run php script @ specified time intervals use crontab. can particularly beneficial scripts need automatically update information without user interaction such script gathers website statistics can emailed or script regularly retrieves content website.

see: php cli , cron


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -