The time interval between the stored procedures that are executed on a scheduled basis by oracle

Updated on technology 2024-02-08
11 answers
  1. Anonymous users2024-02-05

    Visually, your stored procedure needs to run at these moments:

    create or replace procedure other_proc

    asvhour varchar(2);

    beginvhour := to_char(sysdate, 'hh24');

    if vhour = '01' or vhour = '03' or vhour = '05' or vhour = '07'

    or vhour = '16' or vhour = '18' or vhour = '20' or vhour = '22' then

    Call that stored procedure of yours.

    Since there is no **, write null for the time being;

    null;end if;

    end;variable jobno number;

    begindbms_:jobno, 'other_proc;', trunc(sysdate+1/24,'hh'), 'trunc(sysdate+1/24,''hh'')');

    commit;

    end;

  2. Anonymous users2024-02-04

    declare

    v_date varchar2(8) := '20130312';

    v_date1 date := to_date(v_date, 'yyyymmdd');

    beginloop

    Process name (v date);

    v_date1 := v_date1 + 2/24;

    v_date := to_char(v_date1, 'yyyymmdd');

    exit when v_date1 >= sysdate;

    end loop;

    end;Your stored procedure should determine whether the current time is within that time range.

  3. Anonymous users2024-02-03

    interval => 'sysdate+1'*Interval by one day* The sysdate of the interval indicates the current time of execution, and you have reversed the job and procedure.

    It should be a job to call procedure, not to define a new job in proc

  4. Anonymous users2024-02-02

    You didn't even give the error message.

  5. Anonymous users2024-02-01

    Create a job. Just write the time well. There is a graphical interface in the PLSQL Develope toolbook to create a new job.

    It is to define the name, the name of the stored procedure called, and the execution interval.

  6. Anonymous users2024-01-31

    Get a time at the front of the stored procedure, get a time at the end, subtract 2 times if it's 0, don't doubt this practice, there are no more than 10,000 records, the test should not see the time difference.

  7. Anonymous users2024-01-30

    You can output the time at the beginning and end of the stored procedure.

    dbms_'begin :'||to_char(sysdate,'yyyymmdd hh24:mi:ss');

  8. Anonymous users2024-01-29

    Define a variable in your stored procedure:

    v_hh24 char(2) := '00';

    begin:

    v_hh24 := to_char(sysdate, 'hh24');

    Then add :

    if v_hh24 = '02'then your **;

    end if;

    Then use the script below to create a job:

    begin> :job,what => 'the name of your stored procedure; ',next_date => to_date('01-06-2013 00:00:00', 'dd-mm-yyyy hh24:mi:ss'),interval => 'sysdate+60/1440');

    commit;

    end;/

  9. Anonymous users2024-01-28

    You go and see how to use the trigger in oracle, I'm not too good at using it, just watch more.

  10. Anonymous users2024-01-27

    begin

    10,what => 'insertsysdate;',next_date => sysdate,interval => 'sysdate+1/1440');

    commit;

    end;-Job number 10 is self-specified, or you can specify any number that does not exceed 1000 that does not exist in other places.

  11. Anonymous users2024-01-26

    -- If the 301 is occupied, an error will still be reported, but if it is not occupied, then a 301 job will be created

    begin> 301,what => ' begin

    insertsysdate;

    end;',next_date => sysdate,interval => 'sysdate+1/1440');

    commit;

    end;

Related questions