[clue] [TECH] rsync command runs from command line but not via cron
Brian Gibson
bwg1974 at yahoo.com
Thu Jun 2 09:57:42 MDT 2011
So '> /path/to/my.log' is not sufficient for capturing error messages? Then I
need a review of the basics because why do I see error messages when I run a
command from the command line?
________________________________
From: jacob <jborer at gmail.com>
To: CLUE's mailing list <clue at cluedenver.org>
Sent: Thu, June 2, 2011 9:35:56 AM
Subject: Re: [clue] [TECH] rsync command runs from command line but not via cron
On Thu, Jun 2, 2011 at 9:16 AM, Brian Gibson <bwg1974 at yahoo.com> wrote:
It looks like specifying the full path to ssh did it. Duh. I'm just surprised
>it silently failed since output was being redirected to a file.
>
>
>
If you want errors to go to the log file you need to redirect stderr to stdout.
(Shell errors generally go to stderr, file descriptor 2, not stdout, file
descriptor 1.) Add 2>&1 to end of the cron definition.
-jacob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cluedenver.org/pipermail/clue/attachments/20110602/b7156454/attachment.html
More information about the clue
mailing list