1753761 Members
4582 Online
108799 Solutions
New Discussion юеВ

Re: error from cron

 
Greta Blamire
Frequent Advisor

error from cron

I have a script that I can execute from a prompt but not from cron. When I attempt to execute it from cron I get this error:

sh: 1#drop: Generated or received a file descriptor number that is not valid.

Here is the crontab entry I'm using:

55 07 * * 1-6 su - oracle -c /u01/oracle/admin/TEST/scripts/drop_create.sql 2>&
1#drop and recreate oracle schemas

Any help on this error would be appreciated.
If you can't face the facts, change them!
2 REPLIES 2
Cheryl Griffin
Honored Contributor

Re: error from cron

Is there a space between the 1 and the #drop...?? If not, you need to add a space and retry.

I take it that you are trying to insert a comment by doing this.

"Downtime is a Crime."
Alan Riggs
Honored Contributor

Re: error from cron

Cheryl nailed it. The shell is interpreting "1#drop" as a single file descriptor. Place a space before the # and you should be fine.