On Mar 12, 2011, at 22:21, Tan Cheng wrote: > I need your help again. I know this is a stupid question, just need > someone to help me explain. > > I am hosting with a remote host, they provide cronjob support in > cpanel but no direct SSH support. In cpanel, I can setup the frequency > by some dropdown menu, and there is a text input area to type the > command line you want to run at that frequency. So I want to learn how > to write that line of command. > > I looked at some tutorials, and it seems like, the format to run a > cakephp shell by command line is: > > absolute/path/to/console/cake -app"/path/to/app" shellname > > But my question is where do I specify the full path to the php cli? > (Do I need to?) On my local machine, I can add the path for php cli, > for example "/opt/lampp/bin:$PATH" in the .profile file. But I don't > have SSH access to the shared hosting, so can I do that in the line > above?
If cpanel has a separate place where you can input environment variables, you can set the PATH environment variable there. If not, you can try to prepend it to the command line, like this: PATH="/opt/lampp/bin:$PATH" absolute/path/to/console/cake -app"/path/to/app" shellname Or you could write a wrapper script, like the one shown here: http://book.cakephp.org/view/1110/Running-Shells-as-cronjobs If "php" is already in the standard PATH on the server, then you might not need any of the above. -- 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