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

Re: Cron not working



Quoting Haines Brown (haines@histomat.net):
> On Sun, Jul 19, 2015 at 10:25:38PM -0500, David Wright wrote:
> > Quoting Haines Brown (haines@histomat.net):
> > 
> > > But I did enable a cron log, which for some reason was disabled on my
> > > system. I'll have to wait a week to see what that log has to say. I
> > > don't know how to set its level, or if enabling the cron log captures
> > > all message from the cron daemon.
> > 
> > Well?
> 
> The message in the log appears normal because in fact a backup did
> occur yesterday. I suspect the fix was because I did this:
> 
>   # /etc/init.d/cron restart

That would only help if you'd stopped cron somehow. You can check if
cron was or wasn't running at any time by looking in /var/log/syslog*
for 'foo CRON' where foo is your hostname. There'll be a line like
 foo CRON[5196]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
every hour.

> I had previously not known to do this because I don't believe man
> crontab mentions it

It wouldn't, because it isn't necessary. If it were, mere normal users
wouldn't be able to make cron notice that they'd changed their crontab.
crontabs aren't configuration files in the usual sense of the word:
they're cron's action files.

> and because my prior unorthodox method to initiate
> the command did not require editing the crontab.

This means nothing to me because I can't guess what you did. All we
read was the output from   # crontab -l   which showed that root's
crontab had been installed successfully.

(We would assume that you haven't been poking around in
/var/spool/cron unless you told us.)

Cheers,
David.


Reply to: