Case:
I have windows batch file start.bat
which do some operations using extr_mode
parameter passed from the outside:
rem settings
set extr_mode=%1
rem the rest of the script
When I'm calling it from cmd
using i.e.: start.bat DAILY
it works fine and parameter is passed.
Now I'm trying to call this batch file under DBMS_SCHEDULER
chain job's program:
begin
sys.dbms_scheduler.create_program(program_name => 'OUT_BAT',
program_type => 'EXECUTABLE',
program_action => 'C:\Job\start.bat DAILY',
number_of_arguments => 0,
enabled => true,
comments => 'Out batch file');
end;
/
this program without parameter (program_action => 'C:\Job\start.bat'
) runs ok, but when I'm adding parameter job is failing.
I mean, I'm checking dba_scheduler_job_run_details
and for this step STATUS = SUCCEEDED
, but in ADDITIONAL_INFO
there is:
CHAIN_LOG_ID="490364", STEP_NAME="OUT", STANDARD_ERROR="The system cannot find the path specified.
The system cannot find the path specified."
I didn't find any specific answer for my question, so is it possible to run batch file with parameter from DBMS_SCHEDULER
chain job?