Re: Cron help
If you are wanting help with your code it is always best to share your REAL code whever possible (obviously obfuscate sensitive data such as login credentials) so we can see your true model names and associations etc. It;s always harder to diagnose problems with fictional model names! On Aug 14, 2:09 pm, Prabha vathi prabha.ridd...@gmail.com wrote: I just found that error has nothing to do. The query is not updating the field which i am trying to. It updates other fields. $models = $this-Model-find('first', array('order' = array('RAND()'))); $this-Model-id = $models['Model']['id']; $date = date('Y-m-d H:i:s'); $this-Model-saveField('fff',$date); fff is fieldname and type datatime It is not updating. I can get the id in my mail I just changed the filedname and model name here. Is it good to share the complete code of live site? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Re: Cron help
Prabha, You really do need some way to verify if your Cron Job is being executed correctly before you can truly diagnose where the problem lies. Can you go back to your shared host and request SSH access? This really is a service you require if you are at the point of running cronjobs etc. on your sites, without it you are working blind! HTH, Paul. On Aug 13, 12:00 pm, Prabha vathi prabha.ridd...@gmail.com wrote: Hi, thanks for your help. I will wait others response. Because i can run crons of other website. But i am having problem only in setting up for cakephp. I am sure, there is no problem in cakephp. but the method can be provided by cakephp experts. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Re: Cron help
I asked, I need to pay additional money. I am not sure whether it is really worth. Sites are not earning money. They are in the beginning stage only. I am getting this error. TERM environment variable not set I am now checking this file http://book.cakephp.org/view/1110/Running-Shells-as-cronjobs will shell files have any extension? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Re: Cron help
Prabha, I wrote an article a couple of years back on this. Not sure if it would be of any help as my servers use DirectAdmin and one of the steps does reccomend checking your cronjob via SSH, but it could have something in there you may have missed. http://www.webbedit.co.uk/blog_posts/view/cakephp-shells-cron-job HTH, Paul. On Aug 14, 11:47 am, Prabha vathi prabha.ridd...@gmail.com wrote: I asked, I need to pay additional money. I am not sure whether it is really worth. Sites are not earning money. They are in the beginning stage only. I am getting this error. TERM environment variable not set I am now checking this filehttp://book.cakephp.org/view/1110/Running-Shells-as-cronjobs will shell files have any extension? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Re: Cron help
I just found that error has nothing to do. The query is not updating the field which i am trying to. It updates other fields. $models = $this-Model-find('first', array('order' = array('RAND()'))); $this-Model-id = $models['Model']['id']; $date = date('Y-m-d H:i:s'); $this-Model-saveField('fff',$date); fff is fieldname and type datatime It is not updating. I can get the id in my mail I just changed the filedname and model name here. Is it good to share the complete code of live site? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Re: Cron help
crontab -e 0 0 * * * i am getting invalid option error now Now i have added the following line, crontab -e 0 0 * * * /---as you mentioned -- / -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Re: Cron help
On Aug 13, 2011, at 01:33, Prabha vathi wrote: crontab -e 0 0 * * * i am getting invalid option error now Now i have added the following line, crontab -e 0 0 * * * /---as you mentioned -- / He said *run* crontab -e. Then, in the editor interface that opens, add the line 0 0 * * * command_to_run This is basic cron usage and is not specific to CakePHP; you should be able to find tons of help for this on Google. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Re: Cron help
Well, How to run crontab - e Where can i run it? It is shared hosting, I have cron job in cpanel. I should enter the time of execution (0 0 * * *) and command. I command, I have added crontab -e 0 0 * * * (path_to_the_file as mentioned) -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Re: Cron help
On Aug 13, 2011, at 03:05, Prabha vathi wrote: Well, How to run crontab - e Where can i run it? On the command line. In an ssh session. If you don't have ssh capability with your hosting then you won't be running crontab -e. It is shared hosting, I have cron job in cpanel. I should enter the time of execution (0 0 * * *) and command. I command, I have added crontab -e 0 0 * * * (path_to_the_file as mentioned) I am not familiar with how to use cpanel but you certainly won't be telling it anything about crontab -e. Consult cpanel documentation or ask your hosting provider how to use it. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Re: Cron help
I don't have ssh. Is there any other way to do it? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Re: Cron help
On Aug 13, 2011, at 03:17, Prabha vathi wrote: I don't have ssh. Is there any other way to do it? You said I have cron job in cpanel and I am not familiar with cpanel so I can only refer you to the cpanel documentation or to your hosting provider for assistance. This is not a CakePHP issue. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Re: Cron help
Hi, thanks for your help. I will wait others response. Because i can run crons of other website. But i am having problem only in setting up for cakephp. I am sure, there is no problem in cakephp. but the method can be provided by cakephp experts. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Re: Cron help
cake prune option1 option2 ... should do the trick On 12 Aug., 12:19, Prabha vathi prabha.ridd...@gmail.com wrote: Hi, http://www.ibm.com/developerworks/opensource/library/os-php-fwk5/?ca=. I used the above link to learn, how to do cron. But I don't understand the below line /column/protected/cakephp/cake/console/cake prune -app /column/protected/cakephp/app/ How to change this to create cron in my shared server? I have option to add crons. Thanks -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Re: Cron help
hi Prabha... Am Freitag, den 12.08.2011, 03:19 -0700 schrieb Prabha vathi: http://www.ibm.com/developerworks/opensource/library/os-php-fwk5/?ca=. I used the above link to learn, how to do cron. But I don't understand the below line /column/protected/cakephp/cake/console/cake prune -app /column/protected/cakephp/app/ How to change this to create cron in my shared server? I have option to add crons. $ crontab -e and paste the following line: @hourly path_to_your_cake/cake/console/cake prune -app path_to_your_cake/app/ replace path_to_your_cake accordingly and the script will be executed every hour. if you need more info about how to control execution times: $ man 5 crontab hth, Sebastian -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Re: Cron help
cron executed correctly. But the file is not executed. path_to_cakephp i used my server's document root -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Re: Cron help
It is my mistake. I added the server's php path also, now cron executed, file executed. now, I got ./console/cake: Permission denied Permission denied -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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