redhat 5.2 tikanga crond running but not reading crontab file

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat redhat 5.2 tikanga crond running but not reading crontab file
# 1  
Old 07-22-2010
redhat 5.2 tikanga crond running but not reading crontab file

Issue:crond is running, can even restart it and /var/log/cron shows it starting. The /etc/crontab file is correct as compared to another machine. I set the crontab file to enter a datestamp into a file under /tmp every minute. Thing is, the crontab file is not being read or cron is not working correctly. I have deleted the crontab entries and retried entering them in again, still not working. No errors either in /var/log/messages.

Anyone know what I can do to get cron working as it should again?

---------- Post updated at 02:01 PM ---------- Previous update was at 01:33 PM ----------

correction, when crond is restarted it does read /etc/crontab, yet it never runs anything in that file.
# 2  
Old 07-22-2010
Post the entry of your crontab and your script.
# 3  
Old 07-22-2010
Code:
00 01 * * * /opt/CancelAuthCronJOB/cancelauth.sh >> opt/CancelAuthCronJOB/logs/CancelAuth.log
00 01 * * * /opt/DailySettlementJob/DailySettlement.sh >> /opt/DailySettlementJob/logs/dailysettlement.log
00 01 * * * /opt/MonthlySettlementJob/MonthlySettlement.sh >> /opt/MonthlySettlementJob/logs/monthlysettlement.log
0 * * * *  /home/smeka1/shellscripts/monitoradapterlogs.sh erros_log.txt
30 * * * * /usr/bin/logSetfaclScript.sh >> /tmp/logsetfacl.log


Last edited by Scott; 07-22-2010 at 07:30 PM.. Reason: Code tags
# 4  
Old 07-22-2010
what is the output?

Code:
 
# tail -f /var/log/cron | grep CMD

# 5  
Old 07-22-2010
there is none. should i stop/start it and tail the log?

---------- Post updated at 02:28 PM ---------- Previous update was at 02:27 PM ----------

i'm just gonna post the last 40 or so lines from that log:

Code:
Jul 22 12:04:05 bmasnq02 crontab[10599]: (root) LIST (root)
Jul 22 12:05:01 bmasnq02 crond[27141]: (*system*) RELOAD (/etc/crontab)
Jul 22 12:05:01 bmasnq02 crond[27141]: nss_ldap: reconnected to LDAP server ldap://sdssnq02/ after 1 attempt
Jul 22 12:07:06 bmasnq02 anacron[32759]: Job `cron.weekly' started
Jul 22 12:08:18 bmasnq02 anacron[32759]: Job `cron.weekly' terminated
Jul 22 12:08:18 bmasnq02 anacron[32759]: Normal exit (2 jobs run)
Jul 22 12:12:30 bmasnq02 crontab[21242]: (root) BEGIN EDIT (root)
Jul 22 12:13:28 bmasnq02 crontab[21242]: (root) END EDIT (root)
Jul 22 12:14:13 bmasnq02 crontab[22869]: (root) BEGIN EDIT (root)
Jul 22 12:14:28 bmasnq02 crontab[22869]: (root) END EDIT (root)
Jul 22 12:14:49 bmasnq02 crond[23432]: (CRON) STARTUP (V5.0)
Jul 22 12:15:49 bmasnq02 crontab[24522]: (root) BEGIN EDIT (root)
Jul 22 12:15:58 bmasnq02 crontab[24522]: (root) REPLACE (root)
Jul 22 12:15:58 bmasnq02 crontab[24522]: (root) END EDIT (root)
Jul 22 12:16:01 bmasnq02 crond[23432]: (root) RELOAD (cron/root)
Jul 22 12:16:19 bmasnq02 crontab[25143]: (root) BEGIN EDIT (root)
Jul 22 12:16:43 bmasnq02 crontab[25143]: (root) REPLACE (root)
Jul 22 12:16:43 bmasnq02 crontab[25143]: (root) END EDIT (root)
Jul 22 12:17:01 bmasnq02 crond[23432]: (root) RELOAD (cron/root)
Jul 22 12:17:19 bmasnq02 crontab[26292]: (root) BEGIN EDIT (root)
Jul 22 12:17:31 bmasnq02 crontab[26292]: (root) REPLACE (root)
Jul 22 12:17:31 bmasnq02 crontab[26292]: (root) END EDIT (root)
Jul 22 12:17:38 bmasnq02 crontab[26834]: (root) BEGIN EDIT (root)
Jul 22 12:18:01 bmasnq02 crond[23432]: (root) RELOAD (cron/root)
Jul 22 12:19:05 bmasnq02 crontab[28460]: (root) LIST (root)
Jul 22 12:19:14 bmasnq02 crontab[28461]: (root) BEGIN EDIT (root)
Jul 22 12:19:21 bmasnq02 crontab[26834]: (root) END EDIT (root)
Jul 22 12:19:24 bmasnq02 crontab[28461]: (root) REPLACE (root)
Jul 22 12:19:24 bmasnq02 crontab[28461]: (root) END EDIT (root)
Jul 22 12:19:28 bmasnq02 crontab[28466]: (root) BEGIN EDIT (root)
Jul 22 12:19:30 bmasnq02 crond[28520]: (CRON) STARTUP (V5.0)
Jul 22 12:20:00 bmasnq02 crontab[28466]: (root) REPLACE (root)
Jul 22 12:20:00 bmasnq02 crontab[28466]: (root) END EDIT (root)
Jul 22 12:20:01 bmasnq02 crond[28520]: (root) RELOAD (cron/root)
Jul 22 12:20:33 bmasnq02 crontab[29617]: (root) BEGIN EDIT (root)
Jul 22 12:20:37 bmasnq02 crontab[29617]: (root) END EDIT (root)
Jul 22 12:23:57 bmasnq02 crontab[969]: (root) LIST (root)


Last edited by Scott; 07-22-2010 at 07:30 PM.. Reason: Code tags
# 6  
Old 07-22-2010
how do add the entries in crontab file ?
Code:
crontab -e

or
Code:
vim /var/spool/cron/root

# 7  
Old 07-22-2010
crontab -e, but if i cat the /var/spool/cron/root i see the same thing in there. I actually noticed a couple of entries missing either the full directory or a preaviling "/". here is the output of both now:
Code:
crontab -l:
00 01 * * * /opt/CancelAuthCronJOB/cancelauth.sh >> /opt/CancelAuthCronJOB/logs/CancelAuth.log
00 01 * * * /opt/DailySettlementJob/DailySettlement.sh >> /opt/DailySettlementJob/logs/dailysettlement.log
00 01 * * * /opt/MonthlySettlementJob/MonthlySettlement.sh >> /opt/MonthlySettlementJob/logs/monthlysettlement.log
0 * * * *  /home/smeka1/shellscripts/monitoradapterlogs.sh >> /home/smeka1/shellscripts/erros_log.txt
20,21,30 * * * * /usr/bin/logSetfaclScript.sh >> /tmp/logsetfacl.log

cat /var/spool/cron/root:

00 01 * * * /opt/CancelAuthCronJOB/cancelauth.sh >> /opt/CancelAuthCronJOB/logs/CancelAuth.log
00 01 * * * /opt/DailySettlementJob/DailySettlement.sh >> /opt/DailySettlementJob/logs/dailysettlement.log
00 01 * * * /opt/MonthlySettlementJob/MonthlySettlement.sh >> /opt/MonthlySettlementJob/logs/monthlysettlement.log
0 * * * *  /home/smeka1/shellscripts/monitoradapterlogs.sh >> /home/smeka1/shellscripts/erros_log.txt
20,21,30 * * * * /usr/bin/logSetfaclScript.sh >> /tmp/logsetfacl.log


Last edited by Scott; 07-22-2010 at 07:31 PM.. Reason: Code tags
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Eth0 not running in redhat 6.4

Hi guys, I really need your help with this. My network interface eth0 is up but not running. I checked udev rules and ifcfg-eth0 files to make sure the mac address are the same. It just would not come up. Please please I will really appreciate the help here. Thank you in advance. (3 Replies)
Discussion started by: cjashu
3 Replies

2. Shell Programming and Scripting

Reading a crontab 3 * * 1,3,5 /path/of/script.sh

Hi! We are on AIX 6.1 TL6 I am an Admin for a Content Management application that is hosted on an AIX machine and i am supposed to come up with a cronjob that runs every monday at 03:00 am. The current schedule of that cron job is : 3 * * 1,3,5 /path/of/script.sh But i do not know... (5 Replies)
Discussion started by: atechcorp
5 Replies

3. UNIX for Advanced & Expert Users

"No such file or directory" while running crontab

I am trying to take backup of server. while running manually, script working successfully. while running in crontab its showing "/bin/sh: /webMethod6/CustomMonitoring/scripts/backupWebMethodsCodeBase.sh: No such file or directory" code forbackupWebMethodsCodeBase.sh #!/bin/ksh #Purpose... (8 Replies)
Discussion started by: elango963
8 Replies

4. Shell Programming and Scripting

Running ffmpeg in loop seems to change reading from file

Hi everyone, I am fairly new to shell scripting. I want to read in numbers from a file (one number per line). This works perfectly fine while read CurrentLine do echo $CurrentLine done < myfile and yields the correct output: 272 745 123 If I however run a ffmpeg... (2 Replies)
Discussion started by: Thriceguy
2 Replies

5. Shell Programming and Scripting

Running a script in crontab which executes a jar file

Hi, I have a script (.sh file) which has been created through my login. This script executes a jar file. Java is installed through my login and the folder has been given full permission for access. When this script is added by root in crontab, it does not get executed. Could you please... (1 Reply)
Discussion started by: archana.n
1 Replies

6. Red Hat

/usr/sbin/crond: can't lock /var/run/crond.pid,

please tell pre-requisite steps to activate cron. i activated the cron but it not executing the script which i set in crontab entry.through root user i passed the service crond start it get start.but when i go to etc/init.d and passed crond stop command.it gets crond: can't lock /var/run/crond.pid,... (2 Replies)
Discussion started by: umair
2 Replies

7. Shell Programming and Scripting

output file of the shell script running through crontab is deleting automatical daily.

Dear Friends, I am working on IBM AIX. I have written one script and kept in the crontab as to run daily at 11:38 AM. and the output of the script to be appended to the file generated with the month name. but my file deleting daily and the new file is creating with the output of the shell... (2 Replies)
Discussion started by: innamuri.ravi
2 Replies

8. UNIX for Advanced & Expert Users

Crontab is not running!!!

Hi experts, need your helpo. after editing the crontab while saving the file it says- "/tmp/crontabRlaauT" 1 line, 77 characters cron may not be running - call your system administrator And i checked after certain time. script in cron is not running. I got a mail in user saying... (1 Reply)
Discussion started by: thepurple
1 Replies

9. UNIX for Dummies Questions & Answers

How to check both the processores running or not in redhat linux

Hi, We have dual processor dell machine loaded with redhat linux 7.2. It was working fine without any problem but recently power went off so suddenly system switched off. From then onwards system is running very slow. My suspect is on processor. How to check both the processors running properly or... (8 Replies)
Discussion started by: bache_gowda
8 Replies

10. UNIX for Dummies Questions & Answers

crond

I noticed that I do not have the crond daemon in my AIX box. I need to create a backup script to run nightly. Where do I find this daemon? Thanks (1 Reply)
Discussion started by: dkbainbridge
1 Replies
Login or Register to Ask a Question