Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem with Cron?

49 views
Skip to first unread message

TaliesinSoft

unread,
May 14, 2008, 9:32:44 AM5/14/08
to
For some time now I have had SuperDuper! set up so that each night two smart
backup runs will occur, one at 2:00 A.M. and one at 5:00 A.M. My Energy Saver
preferences are set so that the computer never sleeps and the screen will
sleep after 15 minutes of inactivity.

When SuperDuper! completes a backup a Growl notification appears on my
desktop. On Monday morning I noticed that the notifications hadn't appeared
and a check showed that the SuperDuper! runs had not occurred. Without my
doing anything the Tuesday runs completed. Today there were no notifications
and the Wednesday runs, as had the Monday runs, had not happened.

I rescheduled the two runs for 8:00 A.M. and 8:30 A.M. and they ran as
scheduled, the 8:30 run underway as I write this.

I am told by Dave Nanian of Shirt-Pocket that the problem is not with
SuperDuper! but is an indication that cron was not running properlyl

So, the question is, why is cron not running and what can I do to ensure that
it will run?

I am running OS 10.5.2 on a MacBook Pro. Volume and Permission verification
via Disk Utility reports no problems.

--
James Leo Ryan ..... Austin, Texas ..... talies...@mac.com

Jolly Roger

unread,
May 14, 2008, 9:25:52 PM5/14/08
to
In article <0001HW.C450542C...@News.Individual.NET>,
TaliesinSoft <talies...@mac.coom> wrote:

> For some time now I have had SuperDuper! set up so that each night two smart
> backup runs will occur, one at 2:00 A.M. and one at 5:00 A.M. My Energy Saver
> preferences are set so that the computer never sleeps and the screen will
> sleep after 15 minutes of inactivity.
>
> When SuperDuper! completes a backup a Growl notification appears on my
> desktop. On Monday morning I noticed that the notifications hadn't appeared
> and a check showed that the SuperDuper! runs had not occurred. Without my
> doing anything the Tuesday runs completed. Today there were no notifications
> and the Wednesday runs, as had the Monday runs, had not happened.
>
> I rescheduled the two runs for 8:00 A.M. and 8:30 A.M. and they ran as
> scheduled, the 8:30 run underway as I write this.
>
> I am told by Dave Nanian of Shirt-Pocket that the problem is not with
> SuperDuper! but is an indication that cron was not running properlyl
>
> So, the question is, why is cron not running and what can I do to ensure that
> it will run?

To start, I would add a job to your cron table that prints a line of
text to a log file to see if it executes.

--
Note: Please send all responses to the relevant news group. If you
must contact me through e-mail, let me know when you send email to
this address so that your email doesn't get eaten by my SPAM filter.

JR

TaliesinSoft

unread,
May 14, 2008, 9:57:37 PM5/14/08
to
On Wed, 14 May 2008 20:25:52 -0500, Jolly Roger wrote (in article
<jollyroger-4E9BA...@news.individual.net>):

[in response to my opening posting in this thread where I queried as to how i
determine that cron really ran]

> To start, I would add a job to your cron table that prints a line of text
> to a log file to see if it executes.

I'm afraid a bit of hand holding is needed as I am totally in the dark when
it comes to using the terminal and writing to a log, etc. I'd be most
appreciative for a step-by-step walk through.

Jolly Roger

unread,
May 14, 2008, 11:05:11 PM5/14/08
to
In article <0001HW.C45102C1...@News.Individual.NET>,
TaliesinSoft <talies...@mac.coom> wrote:

> On Wed, 14 May 2008 20:25:52 -0500, Jolly Roger wrote (in article
> <jollyroger-4E9BA...@news.individual.net>):
>
> [in response to my opening posting in this thread where I queried as to how i
> determine that cron really ran]
>
> > To start, I would add a job to your cron table that prints a line of text
> > to a log file to see if it executes.
>
> I'm afraid a bit of hand holding is needed as I am totally in the dark when
> it comes to using the terminal and writing to a log, etc. I'd be most
> appreciative for a step-by-step walk through.

Ok. Try this:

1. Open a terminal window.

2. Enter this command:

crontab -e

Cron will start the default command-line editor (usually vi - and I will
assume it's vi in these instructions) to edit your cron table.

3. Use the arrow keys on the keyboard to move the cursor to the very
last line in the table.

4. Press the i key on the keyboard to enter (i)nsert mode.

5. If you are not on a blank line, press the right arrow key on the
keyboard to move all the way to the end of the line, then press the
Return key on the keyboard to create a blank line at the very end of the
table.

6. Type this line and press the Return key:

/5 * * * * date >> /Users/you/Desktop/crontest.log 2>&1

7. Press the Escape key on the keyboard to exit (I)nsert mode.

8. Type a colon (:) character to enter command mode, followed
immediately by a w character to indicate you want to (w)rite), followed
immediately by a q character (to indicate you want to (q)uit):

:wq

9. Press Return to execute the command.

You should see a message like this:

crontab: installing new crontab

If you see a message indicating there is a syntax error, you've got a
typo and you should answer yes (y) to the "Do you want to retry the same
edit?" prompt, then correct the typo by entering (i)nsert mode again,
moving to the problem line, and correcting the typo. Then do the :wq
command again.

The /5 * * * * date >> /Users/dlache/Desktop/crontest.log 2>&1 line
tells cron to execute the 'date' command every 5th minute of every hour
of every day, and send the output of the command, along with errors (if
any) to the file /Users/you/Desktop/crontest.log.

Now just sit back and wait for the next 5-minute increment (5, 10, 15,
20, and so on). If cron is executing your cron table, a crontest.log
file should appear on the desktop, and it should contain the output of
the 'date' command at the time of each execution.

TaliesinSoft

unread,
May 14, 2008, 11:10:06 PM5/14/08
to
On Wed, 14 May 2008 22:05:11 -0500, Jolly Roger wrote
(in article <jollyroger-7B674...@news.individual.net>):

[detailed instructions per my earlier plea in this thread]

Many, many, many thanks!

I'll report back with the results.

Jolly Roger

unread,
May 14, 2008, 11:17:33 PM5/14/08
to
In article <0001HW.C45113BE...@News.Individual.NET>,
TaliesinSoft <talies...@mac.coom> wrote:

> On Wed, 14 May 2008 22:05:11 -0500, Jolly Roger wrote
> (in article <jollyroger-7B674...@news.individual.net>):
>
> [detailed instructions per my earlier plea in this thread]
>
> Many, many, many thanks!
>
> I'll report back with the results.

BTW, I usually paste this into the top of my cron tables (in insert
mode):

# Cron Table Line Format:
#
# _____________ minute of the hour (00 - 59)
# | ___________ hour of the day (00 - 32) (military time)
# | | _________ day of the month (1 - 31)
# | | | _______ month of the year (1 - 12)
# | | | | _____ day of the week (1 = Sunday, 2 = Monday, etc.)
# | | | | | ___ command to execute
# | | | | | |
# * * * * * command
#
# An asterisk matches all possible values.
# A single integer matches that exact value.
# A list of integers, separated by commas (no spaces) matches any one
of the listed exact values.
# Two integers separated by a dash (no spaces) matches any value within
that range.
# Step values are appended to the main value separated by a forward
slash (/).
#
# Note: To send output to a log file, use > to replace the file, and >>
to append to the file.
#
# Note: "2>&1" at the end of a command means "redirect standard error
(2) to the same place
# as standard output (1).


That way, any time you edit your table, you'll have a neat cheat sheet
right there at the top. ; )

Jolly Roger

unread,
May 15, 2008, 12:08:00 AM5/15/08
to
In article <jollyroger-7B674...@news.individual.net>,
Jolly Roger <jolly...@pobox.com> wrote:

> 6. Type this line and press the Return key:
>
> /5 * * * * date >> /Users/you/Desktop/crontest.log 2>&1

My apologies. There's a typo in this line. Here's how it should have
read:

*/5 * * * * date >> /Users/you/Desktop/crontest.log 2>&1

Sorry if this caused any confusion!

Xavier Llobet

unread,
May 15, 2008, 2:40:20 AM5/15/08
to
In article <jollyroger-BF832...@news.individual.net>,
Jolly Roger <jolly...@pobox.com> wrote:


> BTW, I usually paste this into the top of my cron tables (in insert
> mode):
>
> # Cron Table Line Format:
> #
> # _____________ minute of the hour (00 - 59)
> # | ___________ hour of the day (00 - 32) (military time)
> # | | _________ day of the month (1 - 31)
> # | | | _______ month of the year (1 - 12)
> # | | | | _____ day of the week (1 = Sunday, 2 = Monday, etc.)

I thought that 0 = Sunday (and 7, by the way)

http://www.crontab.org/


_x.

--
Only one "o" in my e-mail address

Chris Ridd

unread,
May 15, 2008, 3:09:19 AM5/15/08
to
On 2008-05-15 07:40:20 +0100, Xavier Llobet <Xavier....@epfl.ch> said:

> In article <jollyroger-BF832...@news.individual.net>,
> Jolly Roger <jolly...@pobox.com> wrote:
>
>> # | | | | _____ day of the week (1 = Sunday, 2 = Monday, etc.)
>
> I thought that 0 = Sunday (and 7, by the way)

That's correct.

> http://www.crontab.org/

You should however read and trust Apple's supplied documentation over
some website, especially for file formats that aren't completely
standardised. "man 5 crontab" on Leopard documents the field as:

day of week 0-7 (0 or 7 is Sun, or use names)

Cheers,

Chris

Jolly Roger

unread,
May 15, 2008, 3:22:48 AM5/15/08
to
In article <Xavier.Lloobet-E2A...@news.epfl.ch>,
Xavier Llobet <Xavier....@epfl.ch> wrote:

> In article <jollyroger-BF832...@news.individual.net>,
> Jolly Roger <jolly...@pobox.com> wrote:
>
>
> > BTW, I usually paste this into the top of my cron tables (in insert
> > mode):
> >
> > # Cron Table Line Format:
> > #
> > # _____________ minute of the hour (00 - 59)
> > # | ___________ hour of the day (00 - 32) (military time)
> > # | | _________ day of the month (1 - 31)
> > # | | | _______ month of the year (1 - 12)
> > # | | | | _____ day of the week (1 = Sunday, 2 = Monday, etc.)
>
> I thought that 0 = Sunday (and 7, by the way)

Yep - good catch.

--
Please send all responses to the relevant news group. E-mail sent to
this address may be devoured by my very hungry SPAM filter. I do not
read posts from Google Groups. Use a real news reader if you want me to
see your posts.

JR

Tom Stiller

unread,
May 15, 2008, 7:24:53 AM5/15/08
to
In article <jollyroger-22169...@news.individual.net>,
Jolly Roger <jolly...@pobox.com> wrote:

> In article <jollyroger-7B674...@news.individual.net>,
> Jolly Roger <jolly...@pobox.com> wrote:
>
> > 6. Type this line and press the Return key:
> >
> > /5 * * * * date >> /Users/you/Desktop/crontest.log 2>&1
>
> My apologies. There's a typo in this line. Here's how it should have
> read:
>
> */5 * * * * date >> /Users/you/Desktop/crontest.log 2>&1
>
> Sorry if this caused any confusion!

Be advised that such a directive will create an entry like:
"May 14 18:00:00 imac com.apple.launchd[1] (0x10d010.cron[10681]): Could
not setup Mach task special port 9: (os/kern) no access"
in your 'var/log/system.log' file every 5 minutes.

A better (i.e. Mac OS X friendly) way would be to use the free 'Lingon'
software to create a launchd plist in the appropriate library.

--
Tom Stiller

PGP fingerprint = 5108 DDB2 9761 EDE5 E7E3 7BDA 71ED 6496 99C0 C7CF

TaliesinSoft

unread,
May 15, 2008, 9:46:18 AM5/15/08
to
On Wed, 14 May 2008 08:32:44 -0500, TaliesinSoft wrote (in article
<0001HW.C450542C...@News.Individual.NET>):

[a question as to how one could determine whether cron actually attempted to
run an entry in the crontab]

First of all I'm trying (and as I've stated, I'm definitely not versed in
Unix) to fully understand the suggestions offered in the thread, suggestions
which I fully appreciate.

Here is the current contents of my crontab....

====================

0 4 * * * open
file:///Users/adventures/Library/Application\%20Support/SuperDuper\%21/Schedu
led\%20Copies/Smart\%20Update\%20SuperDuper\%21\%20from\%20Cowboy.sdsp/Copy\%
20Job.app

0 5 * * * open
file:///Users/adventures/Library/Application\%20Support/SuperDuper\%21/Schedu
led\%20Copies/Smart\%20Update\%20Lefty\%20from\%20Cowboy.sdsp/Copy\%20Job.app

====================

[Some extra blank lines were inserted by Hogwasher in the above]

I don't think it would make any difference but the two "commands" above are
preceded by a great many empty lines in the crontab.


So, what I am trying to do is in the simplest possible way to determine
whether cron itself actually ran and responded t

Claude V. Lucas

unread,
May 15, 2008, 9:54:14 AM5/15/08
to
In article <0001HW.C451A8DA...@News.Individual.NET>,

Empty lines are ignored, but you have urls rather than directory
locations in this example.

I'm not 100% sure about Leopard cron, but I don't think it
understands url addressing.

Try changing to /Users/you/subdirectory/app (or whereever the app is)
instead of file://....

TaliesinSoft

unread,
May 15, 2008, 10:12:48 AM5/15/08
to
On Thu, 15 May 2008 08:54:14 -0500, Claude V. Lucas wrote (in article
<482c4086$0$34487$742e...@news.sonic.net>):

> In article <0001HW.C451A8DA...@News.Individual.NET>,
> TaliesinSoft <talies...@mac.coom> wrote:
>> On Wed, 14 May 2008 08:32:44 -0500, TaliesinSoft wrote (in article
>> <0001HW.C450542C...@News.Individual.NET>):
>>
>> [a question as to how one could determine whether cron actually attempted
>> to run an entry in the crontab]
>>
>> First of all I'm trying (and as I've stated, I'm definitely not versed in
>> Unix) to fully understand the suggestions offered in the thread,
>> suggestions which I fully appreciate.
>>
>> Here is the current contents of my crontab....
>>
>> ====================
>>
>> 0 4 * * * open
>> file:///Users/adventures/Library/Application\%20Support/SuperDuper\%21/Sch
>>

>> edued\%20Copies/Smart\%20Update\%20SuperDuper\%21\%20from\%20Cowboy.sdsp/C
>> op y\ % 20Job.app

>>
>> 0 5 * * * open
>> file:///Users/adventures/Library/Application\%20Support/SuperDuper\%21/Sch
>>
>> eduled\%20Copies/Smart\%20Update\%20Lefty\%20from\%20Cowboy.sdsp/Copy\%20J
>> ob. ap p
>>
>> ====================
>>
>> [Some extra blank lines were inserted by Hogwasher in the above]
>>
>> I don't think it would make any difference but the two "commands" above
>> are preceded by a great many empty lines in the crontab.
>>
>>
>> So, what I am trying to do is in the simplest possible way to determine
>> whether cron itself actually ran and responded t
>>
>> --
>
> Empty lines are ignored, but you have urls rather than directory locations
> in this example.
>
> I'm not 100% sure about Leopard cron, but I don't think it understands url
> addressing.
>
> Try changing to /Users/you/subdirectory/app (or whereever the app is)
> instead of file://....

The two crontab entries above were placed there by SuperDuper! itself as a
byproduct of using SuperDuper!'s scheduling facility.

The issue is that although the vast majority of time the scheduled backups do
indeed run there have been a couple of times when they did not run. it has
been suggested to me that in the cases where the scheduled backups did not
occur the issue might be that cron itself did not run.

Tom Stiller

unread,
May 15, 2008, 10:21:13 AM5/15/08
to
In article <0001HW.C451A8DA...@News.Individual.NET>,
TaliesinSoft <talies...@mac.coom> wrote:

As I mentioned in a prior post, cron will trigger an entry of the form:

imac com.apple.launchd[1] (0x10d110.cron[12308]): Could not setup Mach

task special port 9: (os/kern) no access

in /var/log/syslog.log each time one of its commands is executed. If
you have such an entry, then cron executed the command at the time
stamped on the entry.

TaliesinSoft

unread,
May 15, 2008, 10:58:49 AM5/15/08
to
On Thu, 15 May 2008 09:21:13 -0500, Tom Stiller wrote
(in article <tomstiller-162AB...@newsgroups.comcast.net>):

[continuing in the "is cron running" saga]

> As I mentioned in a prior post, cron will trigger an entry of the form:
>
> imac com.apple.launchd[1] (0x10d110.cron[12308]): Could not setup Mach
> task special port 9: (os/kern) no access
>
> in /var/log/syslog.log each time one of its commands is executed. If
> you have such an entry, then cron executed the command at the time
> stamped on the entry.

Is there a simple terminal command that I can enter to view the above
mentioned log?

Jolly Roger

unread,
May 15, 2008, 11:06:47 AM5/15/08
to
In article <tomstiller-162AB...@newsgroups.comcast.net>,
Tom Stiller <tomst...@comcast.net> wrote:

> cron will trigger an entry of the form:
>
> imac com.apple.launchd[1] (0x10d110.cron[12308]): Could not setup Mach
> task special port 9: (os/kern) no access
>
> in /var/log/syslog.log each time one of its commands is executed

No, that happens only on Leopard, and it's a bug. Some have reported
clean installing Leopard fixes the issue, but I haven't read any real
diagnosis of what actually causes the message.

At any rate, it's not like users of SuperDuper have a choice. SuperDuper
currently uses cron to schedule backups, and that's what we're stuck
with. And the messages aren't going to hurt anything anyway.

Jolly Roger

unread,
May 15, 2008, 11:08:34 AM5/15/08
to
In article <482c4086$0$34487$742e...@news.sonic.net>,

cla...@sonic.net (Claude V. Lucas) wrote:

> I'm not 100% sure about Leopard cron, but I don't think it
> understands url addressing.

The 'open' command-line tool understands URLs. See the manual for
details.

Jolly Roger

unread,
May 15, 2008, 11:08:58 AM5/15/08
to
In article <tomstiller-713BA...@newsgroups.comcast.net>,
Tom Stiller <tomst...@comcast.net> wrote:

> A better (i.e. Mac OS X friendly) way would be to use the free 'Lingon'
> software to create a launchd plist in the appropriate library.

Tell that to the author of SuperDuper. ; )

Jolly Roger

unread,
May 15, 2008, 11:10:48 AM5/15/08
to
In article <0001HW.C451B9D9...@News.Individual.NET>,
TaliesinSoft <talies...@mac.coom> wrote:

Sure. As admin (su admin, if needed) do:

cat /var/log/system.log

Or, if you want to watch the log in real-time, you can do:

tail -f /var/log/system/log

When you're done watching it, type Control-C on the keyboard to exist
'tail'.

TaliesinSoft

unread,
May 15, 2008, 11:12:51 AM5/15/08
to
On Thu, 15 May 2008 10:06:47 -0500, Jolly Roger wrote (in article
<jollyroger-AEBB2...@individual.net>):

> At any rate, it's not like users of SuperDuper have a choice. SuperDuper
> currently uses cron to schedule backups, and that's what we're stuck with.

Are you suggesting that there might be a better way for SuperDuper! to
schedule backups other than using cron?

[says me as I'm trying to digest (and learn from) the wealth of information
being posted in this thread]

Jolly Roger

unread,
May 15, 2008, 11:18:14 AM5/15/08
to
In article <0001HW.C451BD23...@News.Individual.NET>,
TaliesinSoft <talies...@mac.coom> wrote:

> On Thu, 15 May 2008 10:06:47 -0500, Jolly Roger wrote (in article
> <jollyroger-AEBB2...@individual.net>):
>
> > At any rate, it's not like users of SuperDuper have a choice. SuperDuper
> > currently uses cron to schedule backups, and that's what we're stuck with.
>
> Are you suggesting that there might be a better way for SuperDuper! to
> schedule backups other than using cron?
>
> [says me as I'm trying to digest (and learn from) the wealth of information
> being posted in this thread]

Well... define "better" in this context. ; ) There are certainly
*other* ways (launchd, for instance), but launchd is a relatively young
piece of code in comparison, and some might consider cron to be a fine
solution.

David Sankey

unread,
May 15, 2008, 11:27:24 AM5/15/08
to
In article <jollyroger-01F91...@individual.net>,
Jolly Roger <jolly...@pobox.com> wrote:

> In article <0001HW.C451B9D9...@News.Individual.NET>,
> TaliesinSoft <talies...@mac.coom> wrote:
>
> > On Thu, 15 May 2008 09:21:13 -0500, Tom Stiller wrote
> > (in article <tomstiller-162AB...@newsgroups.comcast.net>):
> >
> > [continuing in the "is cron running" saga]
> >
> > > As I mentioned in a prior post, cron will trigger an entry of the form:
> > >
> > > imac com.apple.launchd[1] (0x10d110.cron[12308]): Could not setup Mach
> > > task special port 9: (os/kern) no access
> > >
> > > in /var/log/syslog.log each time one of its commands is executed. If
> > > you have such an entry, then cron executed the command at the time
> > > stamped on the entry.
> >
> > Is there a simple terminal command that I can enter to view the above
> > mentioned log?
>
> Sure. As admin (su admin, if needed) do:
>
> cat /var/log/system.log
>
> Or, if you want to watch the log in real-time, you can do:
>
> tail -f /var/log/system/log
>
> When you're done watching it, type Control-C on the keyboard to exist
> 'tail'.

You just need to be in the admin group, no need (ever?) for su, no need
in this case for sudo.

ls -l /var/log/sys*.log
-rw-r----- 1 root admin 3619 May 15 15:34 /var/log/system.log

Kind regards,

Dave

TaliesinSoft

unread,
May 15, 2008, 11:33:52 AM5/15/08
to
On Thu, 15 May 2008 10:10:48 -0500, Jolly Roger wrote (in article
<jollyroger-01F91...@individual.net>):

[kindly providing me with instructions on how to view the sysem.log]

> Sure. As admin (su admin, if needed) do:
>
> cat /var/log/system.log
>
> Or, if you want to watch the log in real-time, you can do:
>
> tail -f /var/log/system/log
>
> When you're done watching it, type Control-C on the keyboard to exist
> 'tail'.

I did as suggested above and found a log filled with literally thousands of
entries, an entry every five seconds since midnight. Here is a sample....

====================

May 15 00:00:23 The-Acrobatic-Aardvark com.apple.launchd[305]
([0x0-0x28028].com.apple.TWAINBridge[336]): Did not die after sending SIGKILL
8735 seconds ago...

May 15 00:00:28 The-Acrobatic-Aardvark com.apple.launchd[305]
([0x0-0x28028].com.apple.TWAINBridge[336]): Did not die after sending SIGKILL
8740 seconds ago...

May 15 00:00:33 The-Acrobatic-Aardvark com.apple.launchd[305]
([0x0-0x28028].com.apple.TWAINBridge[336]): Did not die after sending SIGKILL
8745 seconds ago...

May 15 00:00:38 The-Acrobatic-Aardvark com.apple.launchd[305]
([0x0-0x28028].com.apple.TWAINBridge[336]): Did not die after sending SIGKILL
8750 seconds ago...

====================

I've inserted the blank lines above.

My gutsy response to the above is that there is something wrong and any
advice or suggestions will certainly be most welcome!

TaliesinSoft

unread,
May 15, 2008, 11:40:15 AM5/15/08
to
On Thu, 15 May 2008 10:18:14 -0500, Jolly Roger wrote (in article
<jollyroger-A0D50...@individual.net>):

> In article <0001HW.C451BD23...@News.Individual.NET>,
> TaliesinSoft <talies...@mac.coom> wrote:
>
>> On Thu, 15 May 2008 10:06:47 -0500, Jolly Roger wrote (in article
>> <jollyroger-AEBB2...@individual.net>):
>>
>>> At any rate, it's not like users of SuperDuper have a choice. SuperDuper
>>> currently uses cron to schedule backups, and that's what we're stuck
>>> with.
>>
>> Are you suggesting that there might be a better way for SuperDuper! to
>> schedule backups other than using cron?
>>
>> [says me as I'm trying to digest (and learn from) the wealth of
>> information being posted in this thread]
>
> Well... define "better" in this context. ; ) There are certainly *other*
> ways (launchd, for instance), but launchd is a relatively young piece of
> code in comparison, and some might consider cron to be a fine solution.

Being somewhat of a Unix ignoramus I have no idea if there is something that
would be considered "a better way" for SuperDuper! to schedule backups. I
guess I was perhaps adding my own interpretation to your stating "that's what
were stuck with" in regards to how SuperDuper! schedules backups.

David Sankey

unread,
May 15, 2008, 11:58:39 AM5/15/08
to
In article <0001HW.C451A8DA...@News.Individual.NET>,
TaliesinSoft <talies...@mac.coom> wrote:

You could extend these lines with (all on the same line):
2>&1 | mail -s "SuperDuper from Cowboy" talies...@mac.coom

The "2>&1" maps stderr onto stdout and the "| mail -s subject address"
sends all this lot as an email to address with the specified subject.

For example the following crontab sent me the following mail:
53 16 * * * open /etc/rubbish 2>&1 | mail -s "rubbish" me@here

To: me@here
Subject: rubbish
Date: Thu, 15 May 2008 16:53:00 +0100 (BST)
From: me@there (David Sankey)

2008-05-15 16:53:00.554 open[678] No such file: /etc/rubbish


Kind regards,

Dave

Dave Seaman

unread,
May 15, 2008, 12:38:21 PM5/15/08
to

Nobody mentioned sudo. The point is that you need to use
"su <insert-admin-user-login-name>" if you are not currently logged in as
an admin user, since only admin users are members of the admin group.

> ls -l /var/log/sys*.log
> -rw-r----- 1 root admin 3619 May 15 15:34 /var/log/system.log

--
Dave Seaman
Third Circuit ignores precedent in Mumia Abu-Jamal ruling.
<http://www.indybay.org/newsitems/2008/03/29/18489281.php>

Chris Ridd

unread,
May 15, 2008, 12:40:49 PM5/15/08
to
On 2008-05-15 16:33:52 +0100, TaliesinSoft <talies...@mac.coom> said:

> I did as suggested above and found a log filled with literally thousands of
> entries, an entry every five seconds since midnight. Here is a sample....
>
> ====================
>
> May 15 00:00:23 The-Acrobatic-Aardvark com.apple.launchd[305]
> ([0x0-0x28028].com.apple.TWAINBridge[336]): Did not die after sending SIGKILL
> 8735 seconds ago...

[...]


> My gutsy response to the above is that there is something wrong and any
> advice or suggestions will certainly be most welcome!

Yes, that looks like the sign of a badly written scanner driver (or
scanner software addon) which is stupidly checking to see if the
scanner's there every 5 seconds instead of waiting to be told by the OS.

Cheers,

Chris

TaliesinSoft

unread,
May 15, 2008, 1:00:52 PM5/15/08
to
On Thu, 15 May 2008 11:40:49 -0500, Chris Ridd wrote (in article
<6937chF...@mid.individual.net>):

[replying to my stating that there were thousands of duplicate entries in my
system.log, each entry appearing five seconds after the other]

> Yes, that looks like the sign of a badly written scanner driver (or
> scanner software addon) which is stupidly checking to see if the scanner's
> there every 5 seconds instead of waiting to be told by the OS.

Chris,

Methinks you got it!

I turned my Canon MP-470 printer-scanner-copier off and on and then checked
the log and the multiple entries were no longer being added.

Many thanks.

Chris Ridd

unread,
May 15, 2008, 1:24:54 PM5/15/08
to
On 2008-05-15 18:00:52 +0100, TaliesinSoft <talies...@mac.coom> said:

> On Thu, 15 May 2008 11:40:49 -0500, Chris Ridd wrote (in article
> <6937chF...@mid.individual.net>):
>
> [replying to my stating that there were thousands of duplicate entries in my
> system.log, each entry appearing five seconds after the other]
>
>> Yes, that looks like the sign of a badly written scanner driver (or
>> scanner software addon) which is stupidly checking to see if the scanner's
>> there every 5 seconds instead of waiting to be told by the OS.
>
> Chris,
>
> Methinks you got it!

Great!

> I turned my Canon MP-470 printer-scanner-copier off and on and then checked
> the log and the multiple entries were no longer being added.

Is there some sort of extra Canon software that watches for special
buttons on the MP470? It may be that the problem is only in that extra
software, and not the whole scanner driver.

Cheers,

Chris

Jolly Roger

unread,
May 15, 2008, 3:23:38 PM5/15/08
to
In article <D.P.C.Sankey-2608...@south.jnrs.ja.net>,
David Sankey <D.P.C....@rl.ac.uk> wrote:

> In article <jollyroger-01F91...@individual.net>,
> Jolly Roger <jolly...@pobox.com> wrote:
>
> > As admin (su admin, if needed) do:
> >
> > cat /var/log/system.log
> >
> > Or, if you want to watch the log in real-time, you can do:
> >
> > tail -f /var/log/system/log
> >
> > When you're done watching it, type Control-C on the keyboard to exist
> > 'tail'.
>
> You just need to be in the admin group, no need (ever?) for su

Wrong. If you are logged into a non-admin account, you are *not* in the
admin group. To switch to an administrator account, you use the 'su'
command.

> no need in this case for sudo

I didn't say 'sudo' was needed.

> ls -l /var/log/sys*.log
> -rw-r----- 1 root admin 3619 May 15 15:34 /var/log/system.log

Precisely.

David Sankey

unread,
May 16, 2008, 6:28:02 AM5/16/08
to
In article <g0hott$798$1...@mailhub227.itcs.purdue.edu>,
Dave Seaman <dse...@no.such.host> wrote:

Mea culpa.

I'd interpreted "As admin (su admin, if needed)" as implying root rather
than admin. RTFM as they say.

su root is bad (where needed you should use sudo, hence my comment).

Logging in by default as a non-admin user is good, and then to look at
the log file you do need to su to an admin user.

Kind regards,

Dave

Jolly Roger

unread,
May 16, 2008, 9:59:27 AM5/16/08
to
In article <D.P.C.Sankey-8D66...@south.jnrs.ja.net>,
David Sankey <D.P.C....@rl.ac.uk> wrote:

> su root is bad (where needed you should use sudo, hence my comment).

Absolutely. I recommend leaving the root account disabled in Mac OS X.
It's rarely (if ever) necessary to enable root in Mac OS X.

Robert Peirce

unread,
May 16, 2008, 11:51:30 AM5/16/08
to
I tried the 2>&1 | mailx -s Cron rbp trick and it helped me solve a
problem I have been running into which is why sometimes it works and
sometimes it doesn't. Turns out, for some reason, cron can't always
find the file. I put in the full path just to make sure and we'll see
what happens.

--
Robert B. Peirce, Venetia, PA 724-941-6883
bob AT peirce-family.com [Mac]
rbp AT cooksonpeirce.com [Office]

Jolly Roger

unread,
May 16, 2008, 2:32:20 PM5/16/08
to
In article <bob-19E009.11513016052008@[199.45.49.11]>,
Robert Peirce <b...@peirce-family.com.invalid> wrote:

> I tried the 2>&1 | mailx -s Cron rbp trick and it helped me solve a
> problem I have been running into which is why sometimes it works and
> sometimes it doesn't. Turns out, for some reason, cron can't always
> find the file. I put in the full path just to make sure and we'll see
> what happens.

What's the verbatim error message?

Robert Peirce

unread,
May 16, 2008, 3:18:19 PM5/16/08
to
In article <jollyroger-F7797...@individual.net>,
Jolly Roger <jolly...@pobox.com> wrote:

> In article <bob-19E009.11513016052008@[199.45.49.11]>,
> Robert Peirce <b...@peirce-family.com.invalid> wrote:
>
> > I tried the 2>&1 | mailx -s Cron rbp trick and it helped me solve a
> > problem I have been running into which is why sometimes it works and
> > sometimes it doesn't. Turns out, for some reason, cron can't always
> > find the file. I put in the full path just to make sure and we'll see
> > what happens.
>
> What's the verbatim error message?

calendar: no calendar file: ".MyCal"

The file actually exists and calendar run by cron usually seems to find
it. Every once in a while it doesn't. I don't know why, but putting in
the full path should correct that problem.

Jolly Roger

unread,
May 16, 2008, 3:49:22 PM5/16/08
to
In article <bob-B08CC4.15181916052008@[199.45.49.11]>,
Robert Peirce <b...@peirce-family.com.invalid> wrote:

> In article <jollyroger-F7797...@individual.net>,
> Jolly Roger <jolly...@pobox.com> wrote:
>
> > In article <bob-19E009.11513016052008@[199.45.49.11]>,
> > Robert Peirce <b...@peirce-family.com.invalid> wrote:
> >
> > > I tried the 2>&1 | mailx -s Cron rbp trick and it helped me solve a
> > > problem I have been running into which is why sometimes it works and
> > > sometimes it doesn't. Turns out, for some reason, cron can't always
> > > find the file. I put in the full path just to make sure and we'll see
> > > what happens.
> >
> > What's the verbatim error message?
>
> calendar: no calendar file: ".MyCal"
>
> The file actually exists and calendar run by cron usually seems to find
> it. Every once in a while it doesn't. I don't know why, but putting in
> the full path should correct that problem.

It's not cron complaining - it's calendar. You definitely use full paths
in cron tables and shell scripts.

Jolly Roger

unread,
May 16, 2008, 3:53:55 PM5/16/08
to
In article <jollyroger-7ED93...@individual.net>,
Jolly Roger <jolly...@pobox.com> wrote:

> You definitely use full paths
> in cron tables and shell scripts.

You *SHOULD* definitely use full paths in cron tables and shell scripts.

Robert Peirce

unread,
May 17, 2008, 9:32:36 AM5/17/08
to
In article <jollyroger-7ED93...@individual.net>,
Jolly Roger <jolly...@pobox.com> wrote:

> In article <bob-B08CC4.15181916052008@[199.45.49.11]>,
> Robert Peirce <b...@peirce-family.com.invalid> wrote:
>
> > In article <jollyroger-F7797...@individual.net>,
> > Jolly Roger <jolly...@pobox.com> wrote:
> >
> > > In article <bob-19E009.11513016052008@[199.45.49.11]>,
> > > Robert Peirce <b...@peirce-family.com.invalid> wrote:
> > >
> > > > I tried the 2>&1 | mailx -s Cron rbp trick and it helped me solve a
> > > > problem I have been running into which is why sometimes it works and
> > > > sometimes it doesn't. Turns out, for some reason, cron can't always
> > > > find the file. I put in the full path just to make sure and we'll see
> > > > what happens.
> > >
> > > What's the verbatim error message?
> >
> > calendar: no calendar file: ".MyCal"
> >
> > The file actually exists and calendar run by cron usually seems to find
> > it. Every once in a while it doesn't. I don't know why, but putting in
> > the full path should correct that problem.
>
> It's not cron complaining - it's calendar. You definitely use full paths
> in cron tables and shell scripts.

I knew it was calendar, not cron. I couldn't figure out why sometimes
it works and sometimes it doesn't and I still can't, but I agree full
paths are the way to go. That was an oversight on my part. I know
better.

Message has been deleted

TaliesinSoft

unread,
May 20, 2008, 5:27:40 PM5/20/08
to
On Tue, 20 May 2008 14:55:28 -0500, Lewis wrote (in article
<slrng36b5g....@cerebus.local>):

> In message <0001HW.C451C210...@News.Individual.NET>
> TaliesinSoft <talies...@mac.coom> wrote:

[responding to the earlier postings in this thread in regards to determining
whether or not cron was running]


>> I did as suggested above and found a log filled with literally thousands
>> of entries, an entry every five seconds since midnight. Here is a
>> sample....
>
>> ====================
>
>> May 15 00:00:23 The-Acrobatic-Aardvark com.apple.launchd[305]
>> ([0x0-0x28028].com.apple.TWAINBridge[336]): Did not die after sending
>> SIGKILL 8735 seconds ago...
>
>

> Well, my guess:
>
> You have a scanner with a very stupid driver.

Last Thursday I turned my Canon MP-470 scanner/copier/printer off and on and
since then the "once every five seconds" log entries have not occurred.

0 new messages