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?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.