update_customer_payment.sql

BEGIN
DBMS_SCHEDULER.create_job (
    job_name        => 'update_snapshots',
    job_type        => 'STORED_PROCEDURE',
    job_action      => 'UPDATE_SNAPSHOT',
    start_date      => SYSTIMESTAMP,
    repeat_interval => 'freq=hourly; byminute=5',
    end_date        => NULL,
    enabled         => TRUE
);
END
 
 
-- 10xe
DBMS_SCHEDULER.create_job (
    job_name        => 'update_invoice_positions',
    job_type        => 'PLSQL_BLOCK',
    job_action      => 'K.INVOICE;',
    start_date      => SYSTIMESTAMP,
    repeat_interval => 'freq=hourly; byminute=0',
    end_date        => NULL,
    enabled         => TRUE
);
 
 
BEGIN
  DBMS_SCHEDULER.run_job (job_name            => 'update_invoice_positions',
                          use_current_session => FALSE);
END;
/
 
 
-- old 8
BEGIN
 DBMS_JOB.ISUBMIT
          (job       => 1,
           what      => 'K.INVOICE;',
           next_date => SYSDATE,
           INTERVAL  => 'sysdate+1/1440');
COMMIT;
END;