Index

Subject : Re: LUG: Anything wrong with this cron entry?

From : "Daniel Underwood" <daniel.underwood@ncsu.[redacted]>

Date : Fri, 07 Oct 2011 17:16:57 -0400

Parent


Yes, I know this stuff--good advice! My problem was that I wasn't sufficiently familiar with the logging system. Now I know more :)

On Friday, October 07, 2011 4:52 PM, "Kevin Hunter" <hunteke@earlham.[redacted]> wrote:
> At 3:11pm -0400 Wed, 05 Oct 2011, Daniel Underwood wrote:
> > For some reason, the "/usr/bin/rsnapshot monthly" entry in the cron
> > listing below was not executed on this past October 1st. It's
> > supposed to be executed once a month on the first day of the month.
> > (I added the monthly run just a few days prior to October 1st, so I
> > don't have any history of it working.) Does anyone see a problem with
> > the cron listing below?
> >
> > [BEGIN TEXT FROM CRON]
> > # m h dom mon dow command
> > 0 * * * * /usr/bin/rsnapshot hourly
> > 30 23 * * * /usr/bin/rsnapshot daily
> > 0 0 1 * * /usr/bin/rsnapshot monthly
> > [END TEXT FROM CRON]
>
> Nothing looks immediately out of place. What debugging measures have
> you tried? Some thoughts:
>
> -----
> 1. Are you sure cron is still running? A process listing can do wonders
> for problem discovery:
>
> $ ps -eF
> (or 'ps waux' for some older timers)
>
> And for some newer members of this list, who may not yet have learned
> about piping, this makes it easier to browse:
>
> $ ps -eF | less
>
> 2. Are you able to execute a simple echo and mail to yourself on, say, a
> minute to minute basis? Something like this:
>
> * * * * * /bin/echo "Hi Mom." | /usr/bin/mail -s "Test from crontab"
> root@localhost
>
> As you appear to have already done, note that it's often easiest to
> debug if you use the full path to all executables rather than relying on
> a may-not-be-what-you-expect-in-crontab PATH variable.
>
> 3. In a dedicated window, consider using the "tail -F" command on
> /var/log/syslog while you do your various crontab works.
>
> 4. If it's /really/ bothering, consider installing yourself a quick and
> limited version of the distro inside of a VirtualBox session. Then
> update the time to just before the month rollover, and see if you can
> recreate the erroneous results
> -----
>
> With the first 3 measures, you'll likely be far more successful tracking
> down your issue that will we without direct access to your machine, or
> face-to-face contact, and the 4th measure is the frickin' sledgehammer
> for if you *must solve it now.*
>
> Cheers and good luck,
>
> Kevin
>
--
Daniel Underwood
North Carolina State University
PhD Student - Industrial Engineering
email: daniel.underwood@ncsu.[redacted]
phone: XXX.302.3291
fax: XXX.515.5281
web: http://www4.ncsu.edu/~djunderw/