Create shells, http://book.cakephp.org/2.0/en/console-and-shells.html
And then run them using CakePHP.
Be forewarned that you can use $uses to import models, but to use 
components you'll need to import Controller/Component from the core, 
ComponentCollections, etc.
I'm not an expert with shells and CakePHP but I did manage to get mine 
working as a cron job, there seems to be a slight lack in documentation on 
this front.

On Friday, September 7, 2012 10:49:41 AM UTC-7, Salines wrote:
>
> Hi.
> Web project on which I am currently working has eight external data 
> sources. I implemented OAuth authorization for them, etc.
>
> Next, I want to use cron for the following tasks:
>
> every minute, refresh data from twitter, facebook and mail server ( 5 
> different actions);
> Every ten minutes, refresh data from youtube and three other services. (4 
> different actions);
> Every hour, run a refresh token (5-6 actions);
> once a day to collect data from Google Analytics;
>
> As you see from time to time will coincide increasing number of jobs.
>
>
> how to organize these activities,
> For every action, make a single command,
> ******, Call first controller action
> ******, Call another controller action
>
> Or one command
>
> ******, Call controller action
>
> / / Every minute
> public function my_action () {
> $ this-> facebook_todo ();
> / / sleep (2), to use or not?
> $ this-> twitter_todo ();
> ...
> }
>
>
> Each of these actions aim to cache query.
> Still something of interest, how to use cronjobs and pagination eg five 
> pages.
>
> Here I need some experience and guidance.
> thanks
>

-- 
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].
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.


Reply via email to