Greetings all:
We are currently using Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
I'm having an issue with running jobs using the DB scheduler. Essentially, I have set my job up as follows:
DBMS_SCHEDULER.CREATE_JOB (
job_name => 'job_name',
job_type => 'PLSQL_BLOCK',
job_action => 'BEGIN PHS_FILE_UPLOAD.LoadDataFiles('||inPrvsnlHldProcGrpHistID||','||inPrvsnlHldFileTypeID||'); END;',
enabled => TRUE,
auto_drop => TRUE,
comments => 'Files load in the database in the background.');
DBMS_SCHEDULER.RUN_JOB('job_name',FALSE); (I've also had the 2nd parameter set to TRUE)
These 2 statements are run from an existing database package, which is called from an APEX application. The job will run and run properly, but it runs twice every time this command is executed. I only want the job to run once when called. The job is essentially populating a table from an external table on the file system.
This job needs to be run on demand by the user from within the APEX application. Does anyone have any recommendations on how I can solve this issue?
Thanks,
Stan