调度函数的执行

How can I get a function executed in a php (cakephp) application at a specific point of time, without the intervention of a person clicking the link or triggering the function by himself/herself?

All other answers so far are right, you'll need to schedule a cron job (or scheduled task on Windows). With that said, CakePHP is designed to answer HTTP requests and not work through the command line.

For a tutorial specific to CakePHP, visit http://bakery.cakephp.org/articles/mathew_attlee/2006/12/05/calling-controller-actions-from-cron-and-the-command-line.

Two things:

For Linux:

https://www.interspire.com/support/kb/questions/298/How+do+I+set+up+CRON+on+my+server%3F

For Windows:

http://troy.jdmz.net/cron/

There is one more stuff, the above method are done on your server machine, but if you are expecting to do this from a page (browser), then you have to use AJAX + setTimeout you can get it done.

Yes using CRON as the scheduler and then using cakePHP shells to execute the code you need.

Here's the documentation from cakePHP 2.0: http://book.cakephp.org/2.0/en/console-and-shells.html