The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > SUN Solaris
Google UNIX.COM


SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Cron problem tez UNIX for Dummies Questions & Answers 3 10-27-2006 02:48 PM
cron problem! blowtorch UNIX for Advanced & Expert Users 4 03-07-2006 09:12 PM
Problem with cron jhansrod AIX 2 11-25-2005 12:30 PM
cron problem VPN UNIX for Dummies Questions & Answers 2 04-16-2004 03:27 AM
Cron Problem Raiden Shell Programming and Scripting 4 11-16-2003 03:00 AM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-18-2007
Registered User
 

Join Date: Feb 2007
Posts: 3
problem with cron job

new to unix here, im learning how to schedule jobs with crontab. The following cron job runs under root but not under a test account i created.

50 11 * * 0 /usr/bin/banner "HELLO" > /dev/console

i have no idea with it isn't running under the test account but runs right on time when i create the cronjob under root.can someone please help? thanks.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 02-18-2007
Registered User
 

Join Date: Feb 2005
Location: Broomfield, CO
Posts: 374
You might check /var/cron/log to make sure the command's executing. Cron jobs won't run if the account's password has been locked. Also, make sure you're using crontab -e to make changes vs hand editing them. Cron doesn't know about new crontabs files unless you restart the cron process. crontab -e kicks the cron process when you save your changes.

Carl
Reply With Quote
  #3 (permalink)  
Old 02-18-2007
Registered User
 

Join Date: Feb 2007
Posts: 3
Thanks for the reply, I checked the log and the error is:
"! could not obtain latest contract from popen(3C): No such process "

I tried a different cron job and it works, it seems this only happens on non-root jobs that produce output.

any help please?
Reply With Quote
  #4 (permalink)  
Old 02-18-2007
Registered User
 

Join Date: Feb 2005
Location: Broomfield, CO
Posts: 374
Well now, with an actual error message, you can google the results. I did a quick google and found this interesting topic over on the sun forums:

http://forum.java.sun.com/thread.jspa?threadID=5073270

You might check it out and see if any of the answers there fix your problem.

Carl
Reply With Quote
  #5 (permalink)  
Old 02-19-2007
Registered User
 

Join Date: Feb 2007
Posts: 3
I actually saw that forum before my second post here, but found no solution. If anyone else in addition to BOFH, please feel free to chime in.
Reply With Quote
  #6 (permalink)  
Old 02-19-2007
Registered User
 

Join Date: Jan 2007
Posts: 366
In general only root has the right to write to /dev/console
Reply With Quote
  #7 (permalink)  
Old 01-16-2008
Registered User
 

Join Date: Jan 2008
Posts: 1
Thumbs down could not obtain latest contract from popen(3C): No such process

could not obtain latest contract from popen(3C): No such process

Got this error when starting a script from cron on Solaris10
Read a lot about it googling around.

Redirecting stdout and stderr to a file (exec 1>/tmp/loglog 2>&1) solved the problem as has been indicated by others; In my case the output was:
"tput: No value for $TERM and no -T specified"

My cron-activated script called another script that uses tput which of course can't do a thing without a TERM...
Which also explained why there was no problem running it manually.

So, it appears to be a bug in cron with handling the output of a script started by it.

If you don't want to or can't wait for patches, redirect stdout/stderr to a file, check the contents of it, solve the problem or, redirect them to /dev/null....
BTW, output on stdout and stderr both cause the same error.

Sun, you should have solved this years ago!
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 08:27 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0