Re: Messaging service
The way in which you would implement it does depend on what kind of jobs you need to run.Just like how there is no "one true backup solution" that fits everyone's needs or every situation.Having it all based out of a "cron_controller" would allow you to build an administration interface for it within your cake application. Accessing it via wget may pose problems with execution time, but only if the scheduled tasks take a long time to run. It would also allow you to run the 1 real cron job required on another server (i.e. your home server/desktop computer) if your web host did not allow you access to cron. Either way, these are all ideas. Putting some of the different ideas together may help someone find the right solution for them.On 9/13/06, Brian Wisti <[EMAIL PROTECTED]> wrote: > I don't see the benefit of the extra roundtrip via the webserver?>> Isn't it more clear to have a cronjob execute a script directly> instead of redirecting it through the webserver and an extra > controller? Moreover, your ISP could impose limits on maximum> execution time. Batch processing may very well take longer than the> timeout.>> --> Martin Schapendonk, [EMAIL PROTECTED]All things being equal, a cron job is probably the best solution. Thenagain, an ISP might not allow cron jobs, forcing you to use aworkaround like this. And of course the workaround itself may end up annoying them, too. There's just no pleasing some folks.Kind Regards,Brian Wistihttp://coolnamehere.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Messaging service
> I don't see the benefit of the extra roundtrip via the webserver? > > Isn't it more clear to have a cronjob execute a script directly > instead of redirecting it through the webserver and an extra > controller? Moreover, your ISP could impose limits on maximum > execution time. Batch processing may very well take longer than the > timeout. > > -- > Martin Schapendonk, [EMAIL PROTECTED] All things being equal, a cron job is probably the best solution. Then again, an ISP might not allow cron jobs, forcing you to use a workaround like this. And of course the workaround itself may end up annoying them, too. There's just no pleasing some folks. Kind Regards, Brian Wisti http://coolnamehere.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Messaging service
On 9/13/06, John Zimmerman <[EMAIL PROTECTED]> wrote: > The other way to do it would be to create a "cronjobs_controller.php" that > would have table called cronjobs full of tasks that needed to be executed > and their corresponding schedules. You could then setup a page to access in > your controller that would check for tasks to execute. You can then setup > an actual cron job to access that part of the controller via a standard url > using wget or possibly curl. That way you know that you are checking for > tasks to run on a regular schedule and not just on page requests. I don't see the benefit of the extra roundtrip via the webserver? Isn't it more clear to have a cronjob execute a script directly instead of redirecting it through the webserver and an extra controller? Moreover, your ISP could impose limits on maximum execution time. Batch processing may very well take longer than the timeout. -- Martin Schapendonk, [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Messaging service
One way you can do it with cake is use an idea similar to psuedo-cron-jobs (there is a php script somewhere).Basically you just check to see if anything is scheduled to happen on each page request. This is assuming the page request happen frequently. The other way to do it would be to create a "cronjobs_controller.php" that would have table called cronjobs full of tasks that needed to be executed and their corresponding schedules. You could then setup a page to access in your controller that would check for tasks to execute. You can then setup an actual cron job to access that part of the controller via a standard url using wget or possibly curl. That way you know that you are checking for tasks to run on a regular schedule and not just on page requests. I have not implemented this yet, but this is how I plan on implementing an automated billing system in the near future.On 9/12/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: I don't think it's beyond Cake at all, I have an application that sendsday-before-reminders to users via SMS. The only different thing is cronjobs, which are simple to set up on your host. Just have a script that sends the email to your users and set the cron to run the scripteveryday. Easy peasy!Chris Hartjes wrote:> On 9/12/06, Marcelo de Moraes Serpa <[EMAIL PROTECTED] > wrote:> > I'm thinking about implementing a service where the user gets warned by> > email 1 day before the event will happen. However, I'm not sure how I will> > trigger it, what I imagine is that a service should be running 24/7. How > > could I do that?> >> > Thanks in advance,> >>> Er, I think that is something beyond the scope of CakePHP and more> along the lines of writing daemon code in PHP. There are some good > examples, but George Schlossnagle's book on Advanced PHP Programming> has a big chapter on writing daemons in PHP.>> I do a lot of work with CLI scripts written in PHP, so it can be done. >> --> Chris Hartjes>> "The greatest inefficiencies come from solving problems you will never have."> -- Rasmus Lerdorf>> @TheBallpark - http://www.littlehart.net/attheballpark> @TheKeyboard - http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Messaging service
I don't think it's beyond Cake at all, I have an application that sends day-before-reminders to users via SMS. The only different thing is cron jobs, which are simple to set up on your host. Just have a script that sends the email to your users and set the cron to run the script everyday. Easy peasy! Chris Hartjes wrote: > On 9/12/06, Marcelo de Moraes Serpa <[EMAIL PROTECTED]> wrote: > > I'm thinking about implementing a service where the user gets warned by > > email 1 day before the event will happen. However, I'm not sure how I will > > trigger it, what I imagine is that a service should be running 24/7. How > > could I do that? > > > > Thanks in advance, > > > > Er, I think that is something beyond the scope of CakePHP and more > along the lines of writing daemon code in PHP. There are some good > examples, but George Schlossnagle's book on Advanced PHP Programming > has a big chapter on writing daemons in PHP. > > I do a lot of work with CLI scripts written in PHP, so it can be done. > > -- > Chris Hartjes > > "The greatest inefficiencies come from solving problems you will never have." > -- Rasmus Lerdorf > > @TheBallpark - http://www.littlehart.net/attheballpark > @TheKeyboard - http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Messaging service
On 9/12/06, Marcelo de Moraes Serpa <[EMAIL PROTECTED]> wrote: > I'm thinking about implementing a service where the user gets warned by > email 1 day before the event will happen. However, I'm not sure how I will > trigger it, what I imagine is that a service should be running 24/7. How > could I do that? > > Thanks in advance, > Er, I think that is something beyond the scope of CakePHP and more along the lines of writing daemon code in PHP. There are some good examples, but George Schlossnagle's book on Advanced PHP Programming has a big chapter on writing daemons in PHP. I do a lot of work with CLI scripts written in PHP, so it can be done. -- Chris Hartjes "The greatest inefficiencies come from solving problems you will never have." -- Rasmus Lerdorf @TheBallpark - http://www.littlehart.net/attheballpark @TheKeyboard - http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Messaging service
no worries mate, i asked the same question the first time around. used to run scheduled jobs such as system tasks, nightly security checks, website analysis reports, and backups. basically, if you are able to administor your server you can set up a cron job to run at certain times during the day - everyday, or on specific days, during specific time periods. you tell cron, i want to run this script (php script you've written) at these times. so in that script you can check your DB for those users who need to be emailed and do so. have a search around on Google for cron, unix / linux and then ask your hosting provider if it possible to implement. cheers, freedom On 13/09/06, Marcelo de Moraes Serpa <[EMAIL PROTECTED]> wrote: > hmmm... forgive my ignorance... but what is a cron job? > > > On 9/12/06, Mikee Freedom <[EMAIL PROTECTED] > wrote: > > > > cron job on the server. > > > > On 13/09/06, Marcelo de Moraes Serpa < [EMAIL PROTECTED]> wrote: > > > I'm thinking about implementing a service where the user gets warned by > > > email 1 day before the event will happen. However, I'm not sure how I > will > > > trigger it, what I imagine is that a service should be running 24/7. How > > > could I do that? > > > > > > Thanks in advance, > > > > > > Marcelo. > > > > > > > > > > > > > > > > > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Messaging service
hmmm... forgive my ignorance... but what is a cron job?On 9/12/06, Mikee Freedom <[EMAIL PROTECTED] > wrote:cron job on the server.On 13/09/06, Marcelo de Moraes Serpa < [EMAIL PROTECTED]> wrote:> I'm thinking about implementing a service where the user gets warned by> email 1 day before the event will happen. However, I'm not sure how I will > trigger it, what I imagine is that a service should be running 24/7. How> could I do that?>> Thanks in advance,>> Marcelo.>> >> --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Messaging service
cron job on the server. On 13/09/06, Marcelo de Moraes Serpa <[EMAIL PROTECTED]> wrote: > I'm thinking about implementing a service where the user gets warned by > email 1 day before the event will happen. However, I'm not sure how I will > trigger it, what I imagine is that a service should be running 24/7. How > could I do that? > > Thanks in advance, > > Marcelo. > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---