Cron not working after several tries
Redhadt RHEL 5.5.56 on a physical machine, not a virtual machine
Cron doesn't seem to be working. I have cron working on an Ubuntu box so I know the basics of cron, but cron does not seem to be working on the Redhat box. This is the first time I tried to use cron on this Redhat box. - Email is not set up on this system at all so no chance of me getting error messages in email from cron. (I get error messages/output from cron in email on my Ubuntu box.) If there is a mail package already installed, let me know what it is, I can try it. But this is a mission critical box, and if I install a package, and a single library changes, it can clobber the whole box and we are in deep shite. (I've had the occasional, but annoying problem with this on Windows.) - I added my user to /etc/cron.allow. What other users have to be in cron.allow? Because it was blank when I edited it as root. - Each line in my personal crontab ends with CR. - I made a test script to run called 'gotest' which should put an entry in a log file every 2 minutes but nothing happens to the log file. I can run 'gotest' manually just fine and it puts an entry in my logfile in my home dir. Could this be a permissions problem of the scripts cron is calling? My permissions of the script 'gotest' called in the crontab looks like this: Code:
-rwxrwxrwx 1 chuck wheel 139 Aug 21 06:34 gotest* Code:
#!/bin/csh Code:
-rw-rw-rw- 1 chuck wheel 283 Aug 20 08:05 logcron.txt Code:
# Crontab file for user 'chuck' - Output from an alias which does 'ls -lut /etc/init.d/cron; ls -lut /etc/crontab; ls -lut /etc/cron.hourly; ls -lut /etc/cron.daily; ls -lut /var/spool/cron' shows this. I restarted cron on Aug 20 8:09am, but something ran on Aug 21 at 4:02am. Code:
# ls -lut /etc/init.d/crond Code:
29271 ? 00:00:00 crond Code:
Aug 21 04:10:01 xpp crond[6756]: (chuck) CMD (/export/home/comp/perl/foo/automail2014/gocron) Any ideas what else I can check? Should we reboot the server? We just rebooted on Monday. |
Have you checked whether the script 'gotest' has executable permission?
- Bhushan |
Yes it has exe permission for all people. I just added that to my original post.
EDIT: Got it! When I put root in /etc/cron.allow, and restarted cron it worked. |
All times are GMT -5. The time now is 08:01 AM. |