Quantcast
Channel: SCN : All Content - Data Services and Data Quality
Viewing all articles
Browse latest Browse all 4013

using exec() for running powershell script in BODS 4.1

$
0
0

Hello,

 

I am trying to run a powershell script by calling it within BODS script using exec(),

 

$Time_stamp=exec('PowerShell.exe','\Droptest\ora\test\oracle\cron\etl\scripts\GetTimeStamp.PS1', 8);

 

print( 'TIME_STAMP-1 IS '||$Time_stamp);

 

When i run the job, it get hang at this exec function & then I have to kill the job from the "monitor" tab of dataservices.

 

After killing the job, in the trace log it shows the result for the print as "     99: 20140306001502".

 

Ideally the script should retun the timestamp "20140306001502". The script file is perfect as when I run this script from the cmd prompt of powershell then it returns the correct value.

 

So I am facing 2 problems,

 

1) The job gets hang at the above exec function

2) what is the correct syntax of exec() for running the powershell script so that it returns the correct value without getting hang.

 

Thanks.


Viewing all articles
Browse latest Browse all 4013

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>