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
# 8  
Old 07-22-2010
hmm ok..

pls can u write the output
Code:
 
# ls -l /opt/CancelAuthCronJOB/cancelauth.sh

Code:
# ps -ef | grep cron

# 9  
Old 07-22-2010
Code:
[root@bmasnq02 tmp]# ls -l /opt/CancelAuthCronJOB/cancelauth.sh
-rwxrwxrwx 1 root root 4797 Oct  1  2009 /opt/CancelAuthCronJOB/cancelauth.sh


[root@bmasnq02 tmp]# ps -ef | grep cron
root      1559     1  0 12:54 ?        00:00:00 crond
root      4253  4798  0 13:26 pts/0    00:00:00 grep cron
[root@bmasnq02 tmp]#


---------- Post updated at 04:27 PM ---------- Previous update was at 03:26 PM ----------

I have verified if I run the hourly/daily/weekly cron jobs that they work. I also removed everything from the crontab and just put in this line:
Code:
* * * * * echo Date `date` >> /tmp/crontest

but it won't even run that.

Moderator's Comments:
Mod Comment Please start using code tags. Thank you.

Last edited by Scott; 07-22-2010 at 07:32 PM.. Reason: Code tags
# 10  
Old 07-24-2010
Quote:
Originally Posted by robjmarquez
Code:
[root@bmasnq02 tmp]# ls -l /opt/CancelAuthCronJOB/cancelauth.sh
-rwxrwxrwx 1 root root 4797 Oct  1  2009 /opt/CancelAuthCronJOB/cancelauth.sh
 
 
[root@bmasnq02 tmp]# ps -ef | grep cron
root      1559     1  0 12:54 ?        00:00:00 crond
root      4253  4798  0 13:26 pts/0    00:00:00 grep cron
[root@bmasnq02 tmp]#

---------- Post updated at 04:27 PM ---------- Previous update was at 03:26 PM ----------

I have verified if I run the hourly/daily/weekly cron jobs that they work. I also removed everything from the crontab and just put in this line:
Code:
* * * * * echo Date `date` >> /tmp/crontest

but it won't even run that.

Moderator's Comments:
Mod Comment Please start using code tags. Thank you.
Check your mail and is there any error about cron?
# 11  
Old 07-24-2010
Quote:
The /etc/crontab file is correct as compared to another machine.
Quote:
when crond is restarted it does read /etc/crontab
Quote:
I have verified if I run the hourly/daily/weekly cron jobs that they work. I also removed everything from the crontab and just put in this line:
Code:
* * * * * echo Date `date` >> /tmp/crontest
but it won't even run that.

The format of /etc/crontab and the files in /etc/cron.d are different from user crontabs. You appear to be using user crontab syntax which is incorrect.
# 12  
Old 07-26-2010
Quote:
Originally Posted by fpmurphy
The format of /etc/crontab and the files in /etc/cron.d are different from user crontabs. You appear to be using user crontab syntax which is incorrect.
Ok, then how should they look? I have verified on another system that is identical that the files all look the same, have same size, have same perms....

---------- Post updated at 05:38 PM ---------- Previous update was at 05:37 PM ----------

Quote:
Originally Posted by ygemici
Check your mail and is there any error about cron?
Nope, no errors. That's what is puzzling me.
# 13  
Old 07-26-2010
Typically /etc/crontab looks like:
Quote:
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
The system crontab file looks almost identical to a user's crontab file, with a couple of subtle differences.

- The system crontab file is not stored in /var/spool/cron, and is not managed with the crontab command. Instead, the file is edited directly with a text editor.

- Entries contain an additional sixth field, which occurs after the five time specification fields but before the command. This field specifies the user the following command should run as (which is usually root).

The default /etc/crontab file comes with only four entries, each of which runs the command run-parts on one of the /etc/cron.hourly, /etc/cron.daily, /etc/cron.weekly, or /etc/cron.monthly directories. Sysadmins are free to add their own entries to the /etc/crontab file.
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