PROMPT Pokrenuta skripta disable_jobs.sql

set serveroutput on;

BEGIN
  DBMS_OUTPUT.PUT_LINE ('----- popis deaktiviranih jobova -----');
  FOR disable_c IN (
    SELECT job_name
      FROM user_scheduler_jobs
     WHERE enabled = 'TRUE'
       AND (   job_name LIKE '%DNEVNI_IZV_PONAVLJANJE'
            OR job_name LIKE '%STANJE_BOOKINGA'
            OR job_name LIKE '%IZMJENE_BOOK_I_OVERBOOK'
            OR job_name LIKE '%GET_USL_RAO'
            OR job_name LIKE '%ROOMCLOUD_REZ'
            OR job_name LIKE '%REZVANJSUS'
            OR job_name LIKE '%EVISITOR')
    )
  LOOP
    DBMS_OUTPUT.PUT_LINE (disable_c.job_name);
    DBMS_SCHEDULER.DISABLE (disable_c.job_name);
  END LOOP;
END;
/
