UNIX Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsUNIX Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 20th, 2005, 09:55 PM
simam simam is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 4 simam User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 4 m 35 sec
Reputation Power: 0
Crontab-problem....please help

I had submitted this problem earlier in this forum..but couldn't get proper solution. Now again I am back to the same. Please shed some light on this.

I am in a login account which is equivalent to root. So obivously I have the permission to submit cronjobs. But frquently I am getting the following mails to root.

From: Super-User <root>
Message-Id: <200512151515.jBFFF1t21018@hasmsd.hss.hns.com>
To: root
Subject: can't access your crontab file. Resubmit it.
Content-Type: text
Content-Length: 53

The error on hasmsd was "No such file or directory"


My account is in such a way that the /var/spool/cron/crontabs/root is the crontab file. This is already there. Then why I am getting that mail? The timing for the mail generation is absolutely random.
I am running some scripts where again crontab [filename] is called. I doubted because of this, the problem happens. But even after removing those lines, the mails are getting generated.
One more thing I want to ask is, if two users are using the same crontab files are there any problems expected?
What exactly is crontab [filename] call doing?

Does this crontab call at any point delete the /var/spool/cron/crontabs/root file? I came to know that when crontab is again called, this will temporarily removes he existing cronjobs. but the file should exist, right?

I could see from Unix cron.c that when stat function is returning error for this user crontab file, the this error is set. For detials: http://cvs.opensolaris.org/source/xref/on/usr/src/cmd/cron/cron.c#BADSTAT
But when all these stat fails?

This is a long query..but anyway, please respond with your ideas.

Thanks a lot,
msima

Reply With Quote
  #2  
Old December 20th, 2005, 10:42 PM
stdunbar stdunbar is offline
Contributing User
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: May 2004
Location: Superior, CO, USA
Posts: 1,704 stdunbar User rank is Major (30000 - 40000 Reputation Level)stdunbar User rank is Major (30000 - 40000 Reputation Level)stdunbar User rank is Major (30000 - 40000 Reputation Level)stdunbar User rank is Major (30000 - 40000 Reputation Level)stdunbar User rank is Major (30000 - 40000 Reputation Level)stdunbar User rank is Major (30000 - 40000 Reputation Level)stdunbar User rank is Major (30000 - 40000 Reputation Level)stdunbar User rank is Major (30000 - 40000 Reputation Level)stdunbar User rank is Major (30000 - 40000 Reputation Level)stdunbar User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Month 2 Days 14 h 56 m 17 sec
Reputation Power: 325
Send a message via ICQ to stdunbar Send a message via Yahoo to stdunbar
First things first - what is your O/S (Solaris 10?)? It seems that you can't see the forest for the trees - you're looking at source code when you should first enable some logging - take a look at both the crontab man page and the syslogd man page to make sure that you're logging what cron is doing.

Next, what are the commands that you're using? The traditional command line (which you know from doing a man cron) is "crontab -e" for the user you want to run the cron as.

Lastly, remember that cron runs with a very restricted environment (which, of course, you read in the man page ). The path that you have in the shell is likely to be way more than is available to you via cron.
__________________
Need Java help? Want to help people who do? Sit down with a cup of Java at the hotjoe forums.

Reply With Quote
  #3  
Old December 21st, 2005, 01:10 AM
simam simam is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 4 simam User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 4 m 35 sec
Reputation Power: 0
The OS is Solaris 2.8
cron outputs are logged and there is nothing strange in the log.
Also the command used in the script was crontab <file name> which is used to set the the content of the file as cronjob for that user.
I would like to know what exactly crontab <file name> does on cron.

Thanks,
msima

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsUNIX Help > Crontab-problem....please help


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway