Hey All,
Okay , I'm gonna admit this issue has me completely stumped and i'm at my wits end.
Below is the code that has been troubling me and i have tried all the things i know or could have googled.
Please help.
Regards,
Nitin
Okay , I'm gonna admit this issue has me completely stumped and i'm at my wits end.
Below is the code that has been troubling me and i have tried all the things i know or could have googled.
session = Popen(['dgmgrl','username/password@dbname','stop observer', '-logfile', '/u01/app/oracle/broker/fsfo_mydg.log'],stdout=PIPE, stderr=PIPE, cwd=r'/u01/app/oracle/product/11.2.0/db1/bin/') output,error = session.communicate() if session.returncode != 0: raise RuntimeError("broker command failed with %s stdout %r stderr %r" % (session.returncode, output, error)) else: print >> file, "The stdout is :\n %s" % output file.flush()So while trying to execute above directly on the terminal , it executes perfectly , But it simply does not runs and throws below error when scheduled to run from crontab.
Error:OSError > 2
OSError > No such file or directory
OSError > None
or Error:RuntimeError > broker command failed with -11 stdout '' stderr ''
Successfully sent email at 2017-03-15 09:32:10.226847
and i have tried all combinations of command formatting.Please help.
Regards,
Nitin