Cześć Ania, > I would like to set a CRON job for my application. > In my server administrative panel I want to define the path for the > CRON job. > The problem is, that I cannot give path as URL (like /mysite.com/users/ > some_cron_function), but I have to specify physical file that is on a > server (full path to specified file like /www/app/...) > > How to do this? Because I want to run CRON as a function in a defined > controller class. I do not want to put that function in separate file, > because it operates on a database.
Since, as you say, it operates on a database, you should not put it in the C tier. Dedicate a model method to your task and build a shell task using that method. /** * @see: http://book.cakephp.org/pl/view/108/The-CakePHP-Console ;-) * */ If you really need to call a controller method (action), you can always use sth like: App::import('controller', 'MyController'); $mc = new MyController; $mc->action(); Pozdrawiam, Piotr Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en