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 > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
crontab problem DebianJ UNIX for Advanced & Expert Users 11 05-22-2009 01:56 AM
Crontab problem jess_t03 AIX 3 05-22-2009 01:42 AM
problem with crontab cleansing_flame UNIX for Dummies Questions & Answers 1 01-29-2008 08:02 PM
Problem with crontab cleansing_flame UNIX for Dummies Questions & Answers 3 01-14-2008 04:03 PM
Problem with Crontab Zak UNIX for Dummies Questions & Answers 2 12-20-2005 05:44 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 10-31-2003
jcgg jcgg is offline
Registered User
  
 

Join Date: Oct 2003
Posts: 2
Problem with crontab

Hi guys!
I have a problem with my crontab. I made a script named expsa.sh, but I can not execute it on crontab:

00 11 * * * /sa/expsa.sh

The strange thing is that i can do it by using `at `:

at -m 1100
at> /sa/expsa.sh

it works!
What can i do for doing the first one?
Thanks. By
  #2 (permalink)  
Old 10-31-2003
oombera's Avatar
oombera oombera is offline Forum Advisor  
Registered User
  
 

Join Date: Aug 2002
Location: Cleveland, OH
Posts: 804
Just a couple ideas til someone with more knowledge of crontab helps you:

- is the "sa" directory located in root? Or is it actually something like /usr/local/sa/expsa.sh, for example?

- are the permissions correct on the file?

- are you receiving any sort of errors on screen, in a logfile, etc. How do you know it's not running, but just not producing any output?
  #3 (permalink)  
Old 10-31-2003
jcgg jcgg is offline
Registered User
  
 

Join Date: Oct 2003
Posts: 2
Sorry

I forgot write about errors.

Yes, sa is in root.
It shows an error: expsa.sh: exp: not found
  #4 (permalink)  
Old 10-31-2003
oombera's Avatar
oombera oombera is offline Forum Advisor  
Registered User
  
 

Join Date: Aug 2002
Location: Cleveland, OH
Posts: 804
The only thing I could find on that error was an old post in the IT Resource Center forums, and it looks like the only solution they came up with was that the OP should be using an absolute pathname instead of a relative one (e.g. /usr/local/someFile rather than just someFile), so I'm not sure what's wrong with the way you have it...
  #5 (permalink)  
Old 10-31-2003
Optimus_P Optimus_P is offline Forum Advisor  
flim flam flamma jamma
  
 

Join Date: May 2001
Location: Chicago IL, USA
Posts: 1,006
crons PATH env variable can be set in /etc/default/cron on solaris.

if you dont want to use absolute paths in your script, makesure you specify the PATH env variable in yoru script befor you run any commands.
  #6 (permalink)  
Old 10-31-2003
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
From at(1)
Quote:
The first part sets up the environment to match the environment when the at or batch command was issued. This includes the current shell environment variables, current directory, umask, and ulimit.
And from crontab(1)
Quote:
cron supplies a default environment for every shell, defining:

HOME=user's-home-directory
LOGNAME=user's-login-id
PATH=/usr/bin:/usr/sbin:.
SHELL=/usr/bin/sh
Set your environment to match what cron will give you and then submit the at job. It will fail then.

Scripts that run from cron should not depend on the environment.
Closed Thread

Bookmarks

Tags
solaris

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 05:29 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