The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
crontab : bad minute error crackthehit007 UNIX for Advanced & Expert Users 1 02-16-2009 06:38 AM
Crontab error kclerks11 UNIX for Dummies Questions & Answers 2 12-07-2008 10:12 PM
unexpected crontab error dhanamurthy Shell Programming and Scripting 12 11-06-2008 10:24 PM
crontab -e error uadm26 Linux 5 01-03-2008 12:53 PM
Run perl file in Crontab error. raccsdl Shell Programming and Scripting 2 11-13-2007 07:07 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-18-2009
Pablo_beezo Pablo_beezo is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 85
Crontab error

I have a script which is called in a crontab. The script calls for 2 args when ran on the command line

The crontab line:

05 0-23 * * 0-6 /path/name %arg1 %arg1

I get the following output

Your "cron" job on server
/path/name

produced the following output:

Must be attached to terminal for 'am I' option
stty: : Inappropriate ioctl for device
Must be attached to terminal for 'am I' option

any help???????
  #2 (permalink)  
Old 02-18-2009
quirkasaurus's Avatar
quirkasaurus quirkasaurus is offline
Registered User
  
 

Join Date: Jan 2009
Location: canton, michigan
Posts: 373
your script might have a "tty" command in there somewhere.
possibly in a command with a bunch of pipes.

You should post the script contents and we'll see...
  #3 (permalink)  
Old 02-18-2009
homeyjoe homeyjoe is offline
Registered User
  
 

Join Date: Jan 2009
Location: Minnesota
Posts: 63
My guess is your script is checking for a terminal type but cron doesn't have a terminal so you get that error. It'd help if you posted the /path/name file if possible.
  #4 (permalink)  
Old 02-20-2009
methyl methyl is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 1,163
My guess is that the script contains the unix command:
who am I
That command will only work from a real terminal.

Your script may need something like:
Code:
if [ -t ]
then
      who am I
fi
  #5 (permalink)  
Old 02-23-2009
Pablo_beezo Pablo_beezo is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 85
I have solved this now and i had some issues with the actual script:

i cd'd to my basepath but i had not set it before i called it.

Also the cron was wrong, i had:

05 0-23 * * 0-6 /path/name %arg1 %arg1

when

05 0-23 * * 0-6 /path/name arg1 arg1

was sufficient, thanks for the posts
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:48 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0