Hello Mates,
I've been trying to call a python script through a windows batch file (execute.bat). The script is shown below,
C:\AppData\Local\Continuum\anaconda2\python.exe C:\test.py
This batch works perfectly fine when I try run it manually but when I put it under a scheduler, it fails. The scheduler code is shown below,
BEGIN
dbms_scheduler.create_job(
job_name => 'send_mail',
job_type => 'EXECUTABLE',
job_action => 'C:\WINDOWS\system32\cmd.exe',
job_class => 'DEFAULT_JOB_CLASS',
comments => 'Job to call batch script on Windows',
auto_drop => false,
number_of_arguments => 2,
enabled => false
);
dbms_scheduler.set_job_argument_value(
job_name => 'send_mail',
argument_position => 1,
argument_value => '/c'
);
dbms_scheduler.set_job_argument_value(
job_name => 'send_mail',
argument_position => 2,
argument_value => 'C:\Users\63619\Desktop\execute.bat'
);
dbms_scheduler.enable('send_mail');
dbms_scheduler.run_job('send_mail');
END;
/
Thank you,
B