Re: Broken crontab/anacron

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2005-01-24 at 16:07 -0500, James Pifer wrote:
> On Mon, 2005-01-24 at 11:08, Robert Nichols wrote:
> > James Pifer wrote:
> > > I rebuilt one of my systems last week using FC3 and somehow I broke
> > > anacron or crontab. It hasn't run since Jan 20th according to what is in
> > > root's mailbox. 
> > > 

You should have root aliased to your regular user so it is easy to
monitor roots mail.

> > > I think the problem is anacron. I can't seem to get it running, or at
> > > least keep it running. It says it starts, but then when I look at the
> > > processes, it isn't running. The problem is I don't see anything in any
> > > logs about problems with it. 
> > > 
> > > Does anacron write logs to messages? 
> > > What's the best way to troubleshoot it?
> > > 

anacron is not a continuously running service.

what do you get if you run " # ps aux | grep cron " ?
Mine gives 
[jeff@goliath ~]$ ps aux | grep cron
root      4266  0.0  0.1  4444  812 ?        Ss   00:58   0:00 crond

That indicates crond is running as the service
anacron is a run once-per-boot service per the man page.

> 
> > > My /etc/crontab HAD this in it:
> > > 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
> > > 00 01 * * * root /root/mythtvdbbackup
> > > 00 03 * * * root /root/backupvideos
> > > 35 * * * * root /root/mythlink.sh
> > > 
> > > 
> > > Now it has this:
> > > 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

You have removed the lines for your mythtv installation.
They can be put back if the files are in /root as the paths indicate.

> > > 
> > > 
> > > Permissions on it are:
> > > [root@mythtv etc]# ls -l crontab
> > > -rwxr--r--  1 root root 254 Jan 24 09:22 crontab

The permissions by default are

[jeff@goliath ~]$ ls -l /etc/crontab
-rw-r--r--  1 root root 255 Sep 20 16:58 /etc/crontab

> > > 
> > > Here's what I get when I try to start it. 
> > > [root@mythtv etc]# service anacron start
> > > Starting anacron:                                          [  OK  ]
> > > [root@mythtv etc]# service anacron status
> > > anacron is stopped
> > > [root@mythtv etc]# 
> 

crond and anacron are different.
The cron service is crond.

Use man cron and man anacron to see the difference in their functions.

> Any other ideas why cron is not working correctly?
> 
> Thanks,
> James
> 



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux