Cron tab error: No entry for terminal type "unknown"; sing dumb terminal settings.
hi everybody.
first of all, i want you to know that i tried to Google my problem couple of hours but i didn't found any GOOD answer, can you please try to explain me what is the problem? here it is: i running this cron-tab: " cd /MY_PATH/www/; sudo php -f cron.MY_CROM.php " MY_PATH and MY_CRON are fake names - off course.. :-) please note that the user that run this cron is sudoer. here is the configurations for this user in 'visudo' file: " my_user ALL=(ALL) NOPASSWD: NOPASSWD: ALL " this cron is run about a month and everything was fine till couple of days, then it's started to prompt me this notice: " No entry for terminal type "unknown"; using dumb terminal settings. " did someone can explain me what i the problem? thanks in advance. Shlomi. |
Welcome to LQ
Which distribution are you using ? Seems to me xterm is missing. |
i'm using Fedora 11
|
i did 'yum install xterm' it's found and install it.. let's see what will happened..
|
hi
even i installed the xterm i stil getting the message: " No entry for terminal type "unknown"; using dumb terminal settings. " any other idea? |
Cron : use full path.
Cron does not understand anything but a full path for a command. sudo /usr/bin/php -f <full-path-to>/cron.MY_CROM.php .. will probably work. ..... |
<full-path-to-sudo>/sudo as well
|
Jobs run from cron do not have a terminal. Does the message imply that the /usr/bin/php -f <full-path-to>/cron.MY_CROM.php command is trying to use a terminal -- in which case it cannot work?
If my musing is on the right lines, how come "this cron is run about a month and everything was fine till couple of days". Perhaps cron.MY_CROM.php has been changed, introducing the need for a terminal or, less likely, /usr/bin/php. |
Quote:
In any case it's looks like error message came from the php script, i.e cron was able to run it. But TREM environment variable in cron likely tobe empty (or 'unknown') and I think it's a reason why php script complains. Also I wonder, why script designed to run without user interaction care what terminal it run in ? |
still error.. please help...
Quote:
hi Helpers.. thanks for your concern.. i tried to change the cron to full path as Catkin suggestion but still pormpting the message. the new cron is: " sudo /usr/bin/php -f /home/MY_PATH/cron.MY_CRON.php " but i have coule of questions for 'chrism01' and for 'Valery Reznic' my question for 'chrism01' is, what did you meant in: Quote:
what is the path for sudo command? just to remind you i'm using fedora 11 distribution. and my question for 'Valery Reznic' is, in in your quote: Quote:
second, about: Quote:
thanks again to all of you.. |
Quote:
Term is environment variable it's content is terminal type. Any program (or library - for example ncurces) can examine this variable to determine what terminal is used. Usually only interactive program need it. You can try to run Code:
TERM= /usr/bin/php -f <full-path-to>/cron.MY_CROM.php It should give you same error messages about terminal and you can try change your line for cron as Code:
sudo /usr/bin/env TERM=xterm /usr/bin/php -f /home/MY_PATH/cron.MY_CRON.php But all the same. I don't understand, why your program interested in the TERM |
Thanks.. It's working..
Quote:
Quote:
thanks for everybody.. |
If fedora-based:
edit: /root/.bash_profile add: term=xterm |
All times are GMT -5. The time now is 12:26 AM. |