List Info

Thread: Re: cron problem




Re: cron problem
country flaguser name
United States
2007-04-06 11:34:07
>Date: Fri, 6 Apr 2007 09:30:48 -0700
>From: Ray Van Dolson <rvandolsonesri.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

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-requestredhat.com?subject=unsubscribe
h
ttps://www.redhat.com/mailman/listinfo/redhat-list

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )