As our application grows in size and complexity, we will find ourselves in the need to create and automate certain tasks, deferring the processing of non-interactive tasks for later execution. While we can create shells to perform these operations, some of our needs may be met by the Robot plugin.
While this recipe shows a pure CakePHP approach, there are more involved and scalable alternatives. One of the most used tools is Gearman, available at http://gearman.org/.
The Robot plugin allows us to schedule tasks for later execution, and have those tasks run by a shell. The tasks themselves are actually CakePHP controller actions, which are run by the shell at the specified time.
This recipe shows us ...