问题
Title sums it up, I know little about how I will do this.
See also:
PHP: running scheduled jobs (cron jobs)
回答1:
Have you ever looked at ATrigger? A PHP library is also available to create scheduled tasks without overhead.
Disclaimer: I'm among their team.
回答2:
The best method for scheduled tasks is beanstalkd with delayed put.
回答3:
Use your operating system's scheduled tasks facility. crontab on unix, scheduled tasks on windows.
Then we have some more considerations:
- Do you want to schedule tasks through a PHP script that adds stuff to the main OS way to schedule tasks? or
- Do you want to have a long running php process that will run things at determined times?
For 1, on Unix, you can use something like this module that will do.
For 2, you can use something like this other module.
回答4:
The easiest way I know is a simple cron job.
http://man.cx/cron
回答5:
****PHPCron: Running scheduled tasks from PHP on a web server****
But PHPCron is temporarily not available from there. You might need to look somewhere else
回答6:
One method is to use: http://phpjobscheduler.co.uk/ it will allow you to add/run lots of php scripts, easily manage them and "out of the box" for FREE, its open source.
Best method, not sure, I will leave it upto others to pass judgement.
来源:https://stackoverflow.com/questions/190561/what-is-the-best-method-for-scheduled-tasks-in-php