Re: cron problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>Date: Fri, 6 Apr 2007 09:30:48 -0700
>From: Ray Van Dolson <rvandolson@xxxxxxxx>  
>
>> 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-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux