Index

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

From : Warren Myers <volcimaster@gmail.[redacted]>

Date : Fri, 07 Oct 2011 21:42:53 -0400

Parent


Hi Kevin

Came from a Solaris/BSD background? Never seen the "ef" flag on Linux before :D

It seems like from would *have* to be running if the hourly and daily entries are running.

Daniel: have you checked to see if entries in the cron.daily and cron.hourly tabs are running (presuming ou have anything in there)?

-Warren

On Friday, October 7, 2011, 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
>

--
Warren Myers
http://warrenmyers.com
http://twitter.com/volcimaster
http://www.linkedin.com/in/warrenmyers

Replies :