Cron tab error: No entry for terminal type "unknown"; sing dumb terminal settings.
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
"
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.
In my experience cron has PATH=/bin:/usr/bin, so full path for the commands shouldn't be a problem.
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 ?
In my experience cron has PATH=/bin:/usr/bin, so full path for the commands shouldn't be a problem.
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 ?
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:
<full-path-to-sudo>/sudo as well
?
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:
But TREM environment variable in cron likely tobe empty (or 'unknown')
and I think it's a reason why php script complains.
i didn;t understood what is reason? what is TERM at all??
second, about:
Quote:
Also I wonder, why script designed to run without user interaction
care what terminal it run in ?
i did it via PHP script because it's most easy for me ( as a PHP programmer), this script shall delete all files is some directory each hour but not the files that added in the last 10 minutes.. i don't very familiar with Linux Bash scripts so i did it via PHP, is this problematic?
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:
?
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:
i didn;t understood what is reason? what is TERM at all??
second, about:
i did it via PHP script because it's most easy for me ( as a PHP programmer), this script shall delete all files is some directory each hour but not the files that added in the last 10 minutes.. i don't very familiar with Linux Bash scripts so i did it via PHP, is this problematic?
thanks again to all of you..
php itself is OK, as any other scripting language.
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.
php itself is OK, as any other scripting language.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.