cron problem
m.roth2006 at rcn.com
m.roth2006 at rcn.com
Fri Apr 6 16:34:07 UTC 2007
>Date: Fri, 6 Apr 2007 09:30:48 -0700
>From: Ray Van Dolson <rvandolson at esri.com>
>
>> So, now I read oracle's email....
>> Right:
>> cron env is /bin/sh; and my backup script has #!/bin/bash as the first line, of course, so that's the shell environment.
>>
>> /bin/sh: -c: line 1: syntax error near unexpected token `&'
>> /bin/sh: -c: line 1: `/home/oracle/dbbackup.sh >> /opt/oracle/backup/backup.log 2>>&1'
>>
>> So it's a syntax error in the crontab entry... but *why*?
>> Ok, just went into Bourne, and it doesn't like 2>>&1. So, a simple question: won't it toast backup.log if I don't do that as an append - that is, if I do 2>&1, instead of 2>>&1?
>
>I think it should be alright with 2>&1. You're using >> to append to
>the backup.log previous to that and 2>&1 will just made stderr go to
>stdout...
>
>Give it a try and see.
Thanks. I've just edited oracle's crontab, and we'll see what happens. In the meantime, waiting for next week, I think I'll do it manually (once most of the developers have left - this is a test box, btw), and then when it runs next week, I'll see if the log file remains.
If not, not a biggie.
mark
More information about the redhat-list
mailing list