Almost there... now have it running locally on the command line. For future reference, here's what I had to do:
The cake executable is in cake/console, so I added D:/Work/MySiteName/ cake/console to my Windows path. >From the command line, typing 'cake' now gives a message about input variables etc. Now, if i go to D:/Work/MySiteName/ and type: cake -app /app, it takes app as my current working directory (from now on, I'll call this /app) Then I created a shell in app/vendors/shells and called it email.php In app/vendors/ I created the bash script that nurvzy gave in the post above, and saved it as email.sh Now if I go to /app and type cake email it works fine. So just need to upload it and get it working on the server now... Thanks for the help guys. On 8 Dec, 13:57, WhyNotSmile <[email protected]> wrote: > Thanks for both of those - I'll try them out and see what happens. i > had already seen the CakePHP tutorial, but just couldn't quite get my > head around it. I think the problem was that it demonstrates running > scripts on Linux, and I couldn't get it to work on Windows. But I'll > try again and see how it goes. > > Thanks again for the replies. > > On Dec 8, 10:52 am, nurvzy <[email protected]> wrote: > > > Indeed, however I dislike that tutorial on running shells as cronjobs. > > > Once you get yourself a nice shell to do what you want, getting it to > > run incronI've found its much easier to actually create a new little > > bash script that runs cake __whatever__ for you, then just executing > > your new bash script incron. > > > Example: > > Lets say you've written your shell task as do_something so you could > > run: "cake do_something" from the root of your application. To get > > that to run in a cronjob create a little worker bash called > > "do_something.sh" with the following: > > > #!/bin/bash > > clear > > cd /path/to/your/app/ > > /path/to/your/cake/libs/cake do_something > > > Then all you'd have to do in yourcronis this: > > 0 5 * * * /path/to/do_something.sh > > > Much more simple IMHO. > > > Hope that helps, > > Nick > > > On Dec 7, 10:56 am, Miles J <[email protected]> wrote: > > > > Well your supposed to be using shells, not hitting a controller with a > > > cronjob. > > > >http://book.cakephp.org/view/846/Running-Shells-as-cronjobs 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 [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
