
BEGIN    
    FOR C_JOBS IN (SELECT JOB
                     FROM USER_JOBS
                    WHERE WHAT LIKE '%ETL_INFLACAO%') LOOP
        DBMS_JOB.REMOVE(C_JOBS.JOB);
    END LOOP;

    DBMS_SCHEDULER.CREATE_JOB (
        job_name => 'ETL_INFLACAO_JOB',
        job_type => 'PLSQL_BLOCK',
        job_action => 'BEGIN ETL_INFLACAO(TRUNC(SYSDATE-60), TRUNC(SYSDATE)); END;',
        start_date => TO_DATE('2023-01-01 23:00:00', 'YYYY-MM-DD HH24:MI:SS'),
        repeat_interval => 'FREQ=DAILY',
        end_date => NULL,
        enabled => TRUE,
        auto_drop => FALSE,
        comments => 'Inflacao');
    COMMIT;
END;
/