I created a shell which is ran by cronjob and it's contents are as
follows:

<?php

class DashboardShell extends Shell {

  function main() {
    ClassRegistry::init('Agency')->__reminders();
    ClassRegistry::init('Bednight')->__reminders();
    ClassRegistry::init('RolesStaff')->__reminders();
    ClassRegistry::init('Staff')->__reminders();
    ClassRegistry::init('StaffCrbCheck')->__reminders();
    ClassRegistry::init('CrmTask')->__reminders();
  }

  function crm() {
    ClassRegistry::init('CrmEvent')->__reminders();
  }

}

?>

You simply add the functions you want to run to the models and call
them using ClassRegistry ... as you can see from the script above,
from one shell I can call different jobs by specifying a parameter
(main or crm) when calling the script.  For example main() runs once a
day, crm() runs every minute.

It's been a while since I actioned this so cant remember all aspects
of how I done it off the top of my head, but if you need more
assistance I can easily review it all and give you a fuller
explanation.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to