  | | | Troubles with cron | Troubles with cron 2006-11-15 - By Collins, Kevin [MindWorks]
Back Have you looked at all the "standard" cron pitfalls? The default PATH (and other environment variables) is not the same as being logged in as a given user. This is the typical cause of scripts "not working" from cron...
Kevin
-- --Original Message-- -- From: taroon-list-bounces@(protected) [mailto:taroon-list-bounces@(protected)] On Behalf Of Jesse Fitzgerald Sent: Wednesday, November 15, 2006 10:20 AM To: taroon-list@(protected) Subject: Troubles with cron
Greetings,
I'm having voodoo trouble with cron on my webserver. In a nutshell, cron
is running and the scheduled jobs are logging with no errors; but those scheduled commands aren't actually working. Red Hat Enterprise Linux WS (v. 3 for AMD64/Intel EM64T)
1. To start troubleshooting I took out all five of my cron jobs and picked 2 simple ones to test with. 2. I verified that they ran from the bash shell as root. 3. Attempted to run them every minute individually as scheduled jobs to no avail. 4. I then made shell scripts to run them, verified that the shell scripts ran and worked as root, and scheduled them with cron as above to
no avail. 5. I then tried putting the aforementioned shell scripts in/etc/cron.hourly. Again, the script appears to run normally, but there
is no evidence that it actually worked.
Last night I left in one command that was scheduled to run hourly. I put
the same command in a shell script and placed it in /etc/cron.hourly It updates our users webalizer pages with current apache access logs.
Here is the file listing so you can see the permissions and owernership. drwxr-xr-x 2 root root 4096 Nov 14 17:08 . drwxr-xr-x 67 root root 8192 Nov 15 05:37 .. -rwxr-xr-x 1 root root 69 Nov 14 17:08 webalizer.sh [root@(protected) cron.hourly]#
Here is the cron log output for last night. As always the script did not
update the webalizer pages as it does when ran manually.
Nov 15 05:38:31 circle crond[1824]: (CRON) STARTUP (V5.0) Nov 15 05:55:01 circle crond[2132]: (root) CMD (for i in /etc/webalizer/*.conf; do webalizer -c $i; done) Nov 15 06:01:01 circle crond[2170]: (root) CMD (run-parts /etc/cron.hourly) Nov 15 06:55:02 circle crond[2519]: (root) CMD (for i in /etc/webalizer/*.conf; do webalizer -c $i; done) Nov 15 07:01:01 circle crond[2563]: (root) CMD (run-parts /etc/cron.hourly) Nov 15 07:55:01 circle crond[2974]: (root) CMD (for i in /etc/webalizer/*.conf; do webalizer -c $i; done) Nov 15 08:01:01 circle crond[3021]: (root) CMD (run-parts /etc/cron.hourly) Nov 15 08:55:01 circle crond[3824]: (root) CMD (for i in /etc/webalizer/*.conf; do webalizer -c $i; done) Nov 15 09:01:01 circle crond[3869]: (root) CMD (run-parts /etc/cron.hourly)
Ive searched online for an answer and came up empty handed. Any help would be greatly appreciated.
Kind regards,
Jesse
-- Taroon-list mailing list Taroon-list@(protected) https://www.redhat.com/mailman/listinfo/taroon-list
-- Taroon-list mailing list Taroon-list@(protected) https://www.redhat.com/mailman/listinfo/taroon-list
|
|
 |