jobNo := dba_package.getDatabaseJobID('srm_array_perf_report_pkg.recalIntPerformanceProfile'); IF (jobNo IS NOT NULL AND jobNo != 0) THEN DBMS_OUTPUT.put_line('srm_array_perf_report_pkg.recalIntPerformanceProfile exists and will first be removed before adding a new version'); DBMS_JOB.REMOVE(jobNo); END IF; DBMS_JOB.SUBMIT( job => jobNo, what => 'srm_array_perf_report_pkg.recalIntPerformanceProfile(dateRangeType(null,null,null,SYSDATE-2/24, SYSDATE, null, 0));', next_date => SYSDATE + (3/24), interval => 'TRUNC(SYSDATE+1,''DD'') + (10/24)'); DBMS_OUTPUT.put_line('srm_array_perf_report_pkg.recalIntPerformanceProfile set to run on daily at 10am'); COMMIT; |
su - aptare sqlplus portal/portal @setup_srm_jobs.plb |