|
|
cron not working
hi all,
we have a linux box (fedora core 1) which does not execute cron jobs.
If I do a ps I get:
[root@server root]# ps -ef | grep cron
root 4165 1 0 15:19 ? 00:00:00 crond
so it seems cron is running.
When I add a job to cron it says:
[root@server root]# crontab -e
.......type in crontab job......
crontab: installing new crontab
so the job is added, but it doesn't run. I have redirected the cron
output to a log file but the log file isn't being written to at all.
Any advice would be appreciated
TIA
eddiec :-)
|
|
0
|
|
|
|
Reply
|
chalk (34)
|
12/19/2005 4:37:03 AM |
|
"pc" <chalk@netspace.net.au> wrote in message
news:1134967023.575437.318720@g44g2000cwa.googlegroups.com
> When I add a job to cron it says:
> [root@server root]# crontab -e
> ......type in crontab job......
> crontab: installing new crontab
>
> so the job is added, but it doesn't run. I have redirected the cron
> output to a log file but the log file isn't being written to at all.
>
> Any advice would be appreciated
The crontab file MUST end with a newline character; does yours?
|
|
0
|
|
|
|
Reply
|
ynotssor (744)
|
12/19/2005 4:47:26 AM
|
|
hi,
I have added a newline character and restarted crond but cron jobs are
still not running
help!
eddiec :-)
|
|
0
|
|
|
|
Reply
|
chalk (34)
|
12/19/2005 5:04:47 AM
|
|
On Sun, 18 Dec 2005 21:04:47 -0800, pc wrote:
> hi,
>
> I have added a newline character and restarted crond but cron jobs are
> still not running
>
> help!
>
> eddiec :-)
You really need to be more specific
Is your crontab pointing to a directory containing cron jobs
Are the cron jobs in the correct format (shell scripts and not .sh)
Are your permissions set correctly
what is cron telling you in the logs?
(/var/log/syslog might be a good place to start looking)
and finally
have you read the man page for your system :-)
--
BOFH excuse #160:
non-redundant fan failure
|
|
0
|
|
|
|
Reply
|
shane31 (93)
|
12/19/2005 5:23:03 AM
|
|
On 18 Dec 2005 20:37:03 -0800, pc
<chalk@netspace.net.au> wrote:
> hi all,
>
> we have a linux box (fedora core 1) which does not execute cron jobs.
> If I do a ps I get:
> [root@server root]# ps -ef | grep cron
> root 4165 1 0 15:19 ? 00:00:00 crond
> so it seems cron is running.
>
> When I add a job to cron it says:
> [root@server root]# crontab -e
> ......type in crontab job......
> crontab: installing new crontab
>
> so the job is added, but it doesn't run. I have redirected the cron
> output to a log file but the log file isn't being written to at all.
>
> Any advice would be appreciated
>
Does your crontab job depend on PATH or other environment variables?
Does it contain any % signs?
Are you sure cron doesn't execute your job at the designated time in UTC
rather than local time?
--
You can't hold a man down without staying down with him.
-- Booker T. Washington
|
|
0
|
|
|
|
Reply
|
bmarcum (929)
|
12/19/2005 4:41:37 PM
|
|
On Sun, 18 Dec 2005, pc wrote:
> When I add a job to cron it says:
> [root@server root]# crontab -e
> ......type in crontab job......
> crontab: installing new crontab
Post your crontab file.
--
Yves Bellefeuille <yan@storm.ca>
Google users: To reply to posts, click "show options" next to the
poster's name, and then click "Reply" in the line that says:
"Reply | Reply to Author | Forward | Print | Individual Message"
|
|
0
|
|
|
|
Reply
|
yan6406 (128)
|
12/19/2005 4:50:49 PM
|
|
hi everyone,
thank you very much for the feedback. the problem was the $PATH set in
/etc/crontab was insufficient so cron wasn't finding the script and /
or dependencies that I wanted to run. I specified the full path to the
script in crontab and fixed the $PATH in /etc/crontab and all is now
well.
TY
eddiec :-)
|
|
0
|
|
|
|
Reply
|
chalk (34)
|
12/19/2005 11:04:13 PM
|
|
|
6 Replies
28 Views
(page loaded in 0.121 seconds)
|
|
|
|
|
|
|
|
|