On Aug 14, 2011, at 01:37, Prabha vathi wrote:

> On Sun, Aug 14, 2011 at 11:46 AM, Ryan Schmidt wrote:
> 
>> On Aug 14, 2011, at 00:47, Prabha vathi wrote:
>> 
>> > Shell cron job. I am getting TERM environment variable not set. error.
>> > How to fix this?
>> 
>> Set the TERM environment variable to something reasonable, such as "xterm". 
>> I don't see anything in Cake looking for the TERM environment variable but I 
>> guess something you're using is, and I guess it's not usually set in cron 
>> since cron is not running a shell.
> 
> I am using shell. but it is not crontab -e 
> where to set 'xterm'?

I thought I had already posted this link, but I see now it was in a different 
thread in response to a different person. Please read:

http://book.cakephp.org/view/1110/Running-Shells-as-cronjobs

Take a look at the sample "cakeshell" script, which begins as follows:

#!/bin/bash
TERM=dumb
export TERM

As you see, it sets and exports the TERM environment variable. Then it runs 
cake. The documentation goes on to show how you can call this script from cron 
with certain parameters to run a cake shell you've written.

This can serve as an example if you need to set other environment variables for 
your cake shell, or if you need to call other non-cake programs from cron with 
certain environment variables set.



-- 
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
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to