Sponsored Content
Operating Systems Linux Red Hat root crontab wont execute a script Post 302717559 by RedSpyder on Thursday 18th of October 2012 09:11:43 AM
Old 10-18-2012
root crontab wont execute a script

Greetings/

I have a script listed in my roots crontab

Code:
07 9 * * * /opt/HLRSDATA_2010_OCT/HLRS_Scheduler_sp.sh > /opt/HLRSDATA_2010_OCT/logs/HLRTKJob.log

This script contains the following

Code:
#!/bin/bash
echo HLRSData Scheduler
cd /opt/HLRSDATA_2010_OCT
/usr/bin/java -Xms32m -Xmx1024m -cp ".:HLRSDATA_Premium.jar:lib/commons-net-1.4.1.jar:lib/jakarta-oro-2.0.8.jar:lib/mysql-connector-java-3.1.12-bin.jar:lib/x
ercesImpl.jar" mx.com.txm.hlrsdata.scheduler.HLRS_Scheduler

/opt/HLRSDATA_2010_OCT/HLRS_Scheduler_Reports_sp.sh

/opt/HLRSDATA_2010_OCT/HLRS_Scheduler_Reports_Redundant_sp.sh
/opt/HLRSDATA_2010_OCT/HLRS_Delete_Data_sp.sh
/opt/HLRSDATA_2010_OCT/HLRS_Delete_Data_Redundant_sp.sh
/opt/HLRSDATA_2010_OCT/HLRS_Delete_Files.sh

The script is not running, I checked in /var/log/cron and theres not even a trace that it at least TRIED to run something.

Log:
Code:
Oct 18 08:47:19 isvahlrtk01 crontab[46449]: (root) END EDIT (root)
Oct 18 08:47:22 isvahlrtk01 crontab[46455]: (root) BEGIN EDIT (root)
Oct 18 08:47:35 isvahlrtk01 crontab[46455]: (root) REPLACE (root)
Oct 18 08:47:35 isvahlrtk01 crontab[46455]: (root) END EDIT (root)
Oct 18 08:57:18 isvahlrtk01 crontab[46540]: (root) LIST (root)
Oct 18 09:00:18 isvahlrtk01 crontab[46548]: (root) LIST (root)
Oct 18 09:04:24 isvahlrtk01 crontab[46563]: (root) BEGIN EDIT (root)
Oct 18 09:04:37 isvahlrtk01 crontab[46563]: (root) REPLACE (root)
Oct 18 09:04:37 isvahlrtk01 crontab[46563]: (root) END EDIT (root)
Oct 18 09:07:46 isvahlrtk01 crontab[46578]: (root) LIST (root)

Theres a newline at the end of my crontab, theres no /etc/crontab.allow.

What could be preventing this to be executed?

Thanks in advance

Last edited by RedSpyder; 10-18-2012 at 10:36 AM..
 

10 More Discussions You Might Find Interesting

1. SCO

start script from - execute init 6 (not as root)

I have 2 questions : ---------------------------------- 1 - How can I execute a program when Unix Sco reboot? For example I have two script (two sockets) that I have to start from 2 different users (root and toto). I heard something about "etc/init.d" directory, but I don't know what to... (4 Replies)
Discussion started by: soshell
4 Replies

2. UNIX for Dummies Questions & Answers

how to execute sh script in bash shell via crontab

hello. we are porting over from HPUX Shell to Linux. my default shell is bash so i can no longer schedule to execute a sh script in crontab. can anyone pls help me out? I searched the site but didnt find any details. thanks! (1 Reply)
Discussion started by: jigarlakhani
1 Replies

3. UNIX for Dummies Questions & Answers

file wont execute

sh filename and it gives me an error saying the file doesnt exist but it definately does. (4 Replies)
Discussion started by: iago
4 Replies

4. UNIX for Dummies Questions & Answers

Crontab works but does not execute script

Hi guys, my first post time here, so hello to everyone :) I've got a problem running one of my scripts at work. I can get crontab working on simple scripts (i.e. one that just outputs date to a temp file). but it won't correctly execute the script i want to use. My script is a PHP script. It... (6 Replies)
Discussion started by: renegadeice
6 Replies

5. Shell Programming and Scripting

login into root from user and execute command through script

i have logged in as user. I want to write a script to login into root and execute commands for eg. ifconfig or other command. kindly help me out. (6 Replies)
Discussion started by: pradeepreddy
6 Replies

6. Shell Programming and Scripting

MKS KORN SHELL WONT EXECUTE from windows command prompt

Can anybody help me with this small script , the script works fine and launches the IE from c:\documents and settings \test\my documents>ksh prompt $RunURL1.sh this scitpt works and launches the ie from ksh , but when i schedule it to run the script then i get the error box saying command:1... (2 Replies)
Discussion started by: venu
2 Replies

7. Shell Programming and Scripting

Shell script wont execute

Im using a script that writes a random line to a text file then executes another shell script. My problem is that the lottery shell script will not execute. Im not receiving an errors when running the shell script, and it copies a random line of text to mtest.txt fine. #!/bin/bash nscripts=2... (3 Replies)
Discussion started by: kylecn
3 Replies

8. Shell Programming and Scripting

Crontab does not execute script within a script

Hello All, I have a crontab schedule and its executing a script that is calling another script and does not execute. Crontab : ***** /test.sh and in test.sh /usr/local/file.sh and in file.sh webproxy -l 192.168.1.151 But when I run the script (test.sh) directly it works. But using... (1 Reply)
Discussion started by: Shaan_Shaan
1 Replies

9. Shell Programming and Scripting

Startup script wont execute on NAS

Hi, So I've created /etc/rc.local #!/bin/sh polipo -c /opt/etc/polipo/polipo.conf exit 0 if I run it with ./rc.local it does what its supposed to do and the proxy starts but not at startup. any idea whats wrong? thanks (1 Reply)
Discussion started by: deon
1 Replies

10. Shell Programming and Scripting

Crontab scheduler to execute script every 45 days

Can someone please help me on how to schedule script to run every 45 days in crontab ? Thanks, Prince (5 Replies)
Discussion started by: prince1987
5 Replies
CRON(8) 						      System Manager's Manual							   CRON(8)

NAME
cron - daemon to execute scheduled commands (Vixie Cron) SYNOPSIS
cron DESCRIPTION
Cron should be started from /etc/rc or /etc/rc.local. It will return immediately, so you don't need to start it with '&'. Cron searches /var/spool/cron for crontab files which are named after accounts in /etc/passwd; crontabs found are loaded into memory. Cron also searches for /etc/crontab and the files in the /etc/cron.d/ directory, which are in a different format (see crontab(5)). Cron then wakes up every minute, examining all stored crontabs, checking each command to see if it should be run in the current minute. When execut- ing commands, any output is mailed to the owner of the crontab (or to the user named in the MAILTO environment variable in the crontab, if such exists). Additionally, cron checks each minute to see if its spool directory's modtime (or the modtime on /etc/crontab) has changed, and if it has, cron will then examine the modtime on all crontabs and reload those which have changed. Thus cron need not be restarted whenever a crontab file is modified. Note that the Crontab(1) command updates the modtime of the spool directory whenever it changes a crontab. SEE ALSO
crontab(1), crontab(5) AUTHOR
Paul Vixie <paul@vix.com> 4th Berkeley Distribution 20 December 1993 CRON(8)
All times are GMT -4. The time now is 06:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy