SSIS exit code error with batch file

2.6k views Asked by At

I have a pretty basic batch script which will run fine if I execute it alone. When i try to place this batch file in an SSIS Executre Process Task i get the following error:

[Execute Process Task] Error: In Executing "C:\Program Files\R\R-3.2.0\bin\R.exe" "CMD BATCH --vanilla --slave C:\Users\aaaa\Documents\Daily_Risk_Model_Script.R" at "", The process exit code was "1" while the expected was "0".

The script i have in the batch file is:

"C:\Program Files\R\R-3.2.0\bin\R.exe" CMD BATCH --vanilla --slave "C:\Users\aaaa\Documents\Daily_Risk_Model_Script.R"

And in the execute process task I have:

Executable: C:\Program Files\R\R-3.2.0\bin\R.exe
Arguments: CMD BATCH --vanilla --slave C:\Users\aaaa\Documents\Daily_Risk_Model_Script.R

What am I missing? I have tried slightly different systax with no luck.

MS Visual Studio 2010

Thank you very much for any help.

1

There are 1 answers

2
Metaphor On

You can use the following as the last line of your batch file to set the exit code to 0:

EXIT /B 0