crontab problem

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers crontab problem
# 1  
Old 11-07-2001
crontab problem


I trying to include a script in my crontab as user. I used "crontab -e" to include my script there but does not seem to work. If I understand correctly it is set to run at 11:20 every day, correct?
Can anybody identify any error?


#Sun Microsystems Inc. SunOS 5.7 Generic October 1998
$ pwd
$ whoami
$ ls -l |grep CLFY
-rw-r--r-- 1 oracle dba 36803584 Nov 7 11:29 CLFY_071101.dmp
-rwxr-xr-x 1 oracle dba 162 Nov 6 15:41 exp_CLFY_script
$ crontab -l
20 11 * * * /home/oracle/exp_CLFY_script

$ more /home/oracle/exp_CLFY_script

CUR_DATE=`date '+%d%m%y'`
exp sa/sa@CLFY file=/home/oracle/CLFY_$CUR_DATE.dmp BUFFER=4096 GRANTS=Y COMPRESS=Y ROWS=Y OWNER=sa
echo CLFY_$CUR_DATE.dmp"


The script is working fine when I run it. The crontab doesn't seem to work. Any help will be appriciated.

# 2  
Old 11-07-2001
I also get this:


isgsi01(root)21: tail log
! bad user (oracle) Wed Nov 7 11:20:00 2001
> CMD: /home/oracle/exp_CLFY_script
> oracle 13958 c Wed Nov 7 11:20:00 2001
> CMD: /usr/lib/sa/sa1
> sys 13959 c Wed Nov 7 11:20:00 2001
< oracle 13958 c Wed Nov 7 11:20:00 2001 rc=1
< sys 13959 c Wed Nov 7 11:20:00 2001
> CMD: /usr/lib/sa/sa1
> sys 14273 c Wed Nov 7 11:40:00 2001
< sys 14273 c Wed Nov 7 11:40:00 2001
isgsi01(root)22: pwd

There is no allow file in /etc/cron.d oracle user is not included in the deny file.
# 3  
Old 11-07-2001
I had a look at previous threads and Livinfree's scripts.


I changed the crontab file using "crontab -e" to


$ crontab -l
02 12 * * * /home/oracle/exp_CLFY_script > /home/oracle/logfile.log 2>&1


did not work or created any <B> logfile.log<B> in the /home/oracle directory.

I am really confused, can anyone help.
# 4  
Old 11-07-2001
For some reason the cronjob is not even starting. By what the logs say (and you have verified that oracle isn't in the deny files), you might want to check to see if the oracle password has expired, or if the account is disabled in any way.

I'm finishing up my shift now; I'll look for more links later if you haven't got it figured out yet...
# 5  
Old 11-07-2001
Thanks Livinfree,

The link was usefull. I believe it is the 'oracle' user password.
I have never been given the password for oracle and the procedure is to always switch to user 'oracle' using 'su' from root account.
Do you know if I can do that, if the oracle password has expired?
Thanks alot
# 6  
Old 11-07-2001
It is very likely that your "oracle" user environment
does not get set when you run this cron job. A sure way to deal
with this is to set up your environment explictly in the
shell script (i.e. ORACLE_SID, etc.).

When you log in as the "oracle" user, type "env"
and look for all ORA... variables and make sure to
set and export them explicitly in your shell script.
# 7  
Old 11-08-2001
That's a definite consideration once the script executes, but I don't think cron is even attempting to run the job.

guest100, are you using shadowed passwords? If so, check the /etc/shadow file to verify that there is a valid entry in the password field (the second field). Check the man page for the shadow file (on a Linux system, it's in section 5 - not sure if it would be in the same place for Solaris or any other Unix) for details on what each field means.

Please let us know how it's turns out...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

problem with crontab

hi all does any on has explanation for this result bash-3.00$ crontab -e "/var/tmp/Ex1kayUW" No space left on device The crontab file was not changed. bash-3.00$ (2 Replies)
Discussion started by: osmannix
2 Replies

2. UNIX for Advanced & Expert Users

crontab problem

hi.. i have a program (, and i want what it runs automatically with a "lapsus" of 2 hours. (1,3,5,7,9,11,13,15,17,19,21,23 hrs.) i know what i have to do it using crontab, but i donīt know how to do it. i have the next idea, but the problem is what it doesnīt run on my server... (11 Replies)
Discussion started by: DebianJ
11 Replies

3. AIX

Crontab problem

Hi to all. Guys, i have a truble with oracle user crontab. He work if i'm do 0-59 * * * * echo LOL> ~/test.txt But not work if me set realy norm date For example 14 17 28 12 * echo LOL> ~/test.txt In 17:14 28 December . In log file /var/adm/cron/log nothing.... Please... (3 Replies)
Discussion started by: jess_t03
3 Replies

4. Shell Programming and Scripting

Problem in crontab

Hi All, Am facing an issue while updating the crontab.Getting below error while updating the cron. cron/tmp.XXXX5fXBR6: No space left on device crontab: edits left in /tmp/crontab.XXXXEJX5gw Is there any file where i need to alter using root user so that i can update the cron. TIA... (9 Replies)
Discussion started by: Ashok_oct22
9 Replies

5. Shell Programming and Scripting

Crontab Problem

Dear All , I have .sh script wich has the following inside getFileName=Listportfolio.txt.`date +'%Y%m%d` ftp -n<<EOF user xxx xxx bin cd /home/gbs/FTP_Script get /home/gbs/FTP_Script/$getFileName bye EOF EOF when I run the... (3 Replies)
Discussion started by: habuzahra
3 Replies

6. UNIX for Advanced & Expert Users

crontab problem

hi all while using crontab -e im receiving 754 as output im unable to add a entry in crontab crontab -l is working fine OS: sun5.8 can some one please assist me (4 Replies)
Discussion started by: NIMISH AGARWAL
4 Replies

7. UNIX for Dummies Questions & Answers

problem with crontab

i added to my crontab file: * * * * * echo "hello" it works, i receive a message into my /var/mail/username and i receive: bob in addition to a large text add-on any help appreciated (1 Reply)
Discussion started by: cleansing_flame
1 Replies

8. UNIX for Dummies Questions & Answers

Problem with crontab

I'm trying to get crontab to run a script, but to test crontab I tried out a very simple command: `echo bob` here is my crontab file (I edited it by using `crontab -e`): ----------------- #!/bin/sh 23 10 * * * echo bob and at 10:23 every day I get a new message: in /var/mail/a... (3 Replies)
Discussion started by: cleansing_flame
3 Replies

9. Shell Programming and Scripting

crontab problem

HI, i am working on linux. i have crontab problem i wrote a small script and put it in a crontab . but the script is not running.. i have given following way in crontab -e 02 06 * * * /bin/csh /home/vr_test.csh but the above script is not running please rectify my... (26 Replies)
Discussion started by: rajan_ka1
26 Replies

10. UNIX for Dummies Questions & Answers

Problem with Crontab

I have a server running 5.9 and I'm trying to cron in the following. 00 01 * * 7 cd /data/apache/logs && find . -type f -name "access.*" -mtime +1 -print |xargs rm > /dev/null 2>&1 But I keep get the following error.... 00 01 * * 7 cd /data/apache/logs && find . -type f -name "access.*"... (2 Replies)
Discussion started by: Zak
2 Replies
Login or Register to Ask a Question