1837319 Members
2708 Online
110116 Solutions
New Discussion

Not a terminal message

 
Dave Walley
Frequent Advisor

Not a terminal message

Hi.

I have been running a job using crontab and I have noticed that the jobs are no longer running sucessfully, I am getting the following message in the elm.

Not a terminal
stty: : Not a typewriter
stty: : Not a typewriter
/home/migrate/genrcsrep: COBDIR: Parameter not set.

Can anybody tell me what I need to do.

Thanking you.

Dave
why do i do this to myself
5 REPLIES 5
Albert E. Whale, CISSP
Honored Contributor

Re: Not a terminal message

Dave,

It appears that something has changed either the /etc/profile or the .profile for the user which has Cron Jobs running.

What you need to do is to edit either (or both) of these files and then update them so that they test to insure that any stty commands are occurring in an 'interactive session'.

The command that you can use to test this is the tty -s command. If there is a Terminal associated with the process that is calling the function, then the return status is 0 if the calling process does not have a terminal associated with it, then there is no need to excute the stty commands.

In the scripts which configre the environment, place the

if tty -s
then

< some sequence of commands >

fi


you'll need to try a few different locations, but I'm sure that you'll get the hang of it.

Hope that helps.

Sr. Systems Consultant @ ABS Computer Technology, Inc. http://www.abs-comptech.com/aewhale.html & http://www.ancegroup.com
Albert E. Whale, CISSP
Honored Contributor

Re: Not a terminal message

One more thing,

The message :

/home/migrate/genrcsrep: COBDIR: Parameter not set

Indicates that the environment variable COBDIR was not set whenever this process was run. You'll need to insure that the enviroment configuration scripts also get run for the cron process to be aware of the environment variable.

You could also indicate to your developers that this is an application problem, and they need to establish all required environment variable whenever they execute a cron job.

Hope that helps.

Sr. Systems Consultant @ ABS Computer Technology, Inc. http://www.abs-comptech.com/aewhale.html & http://www.ancegroup.com
CHRIS_ANORUO
Honored Contributor

Re: Not a terminal message

In your .profile in clude these lines to setup terminal variable:
#Set up the terminal:
if [ "$TERM" = "" ]
then
eval ` tset -s -Q -m ':?hp' `
else
eval ` tset -s -Q `
fi

I hope this helps.
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
Sandip Samanta
Occasional Advisor

Re: Not a terminal message

Hi,

First try to run that script from your shell. If it is working properly from your shell but not run from crontab then you should check all the environment variable which was defined in your shell scripts. If it is working properly in your shell then just take all the variable of your shell script by env command & append all those variable in from of your script.

Hope it would work.

Sandip
Albert E. Whale, CISSP
Honored Contributor

Re: Not a terminal message

Dave,

Has this information helped you?

Do you need further assistance?

Sr. Systems Consultant @ ABS Computer Technology, Inc. http://www.abs-comptech.com/aewhale.html & http://www.ancegroup.com