Oracledbms_job.submit usage

Source: Internet
Author: User
If your stored procedure name is PROC_RAIN_JM, write another stored procedure name: PROC_JOB_RAIN_JM

If your stored procedure name is PROC_RAIN_JM, write another stored procedure name: PROC_JOB_RAIN_JM

If your stored procedure is named PROC_RAIN_JM

Write another Stored Procedure named PROC_JOB_RAIN_JM.

Content:

  • Create Or Replace Procedure PROC_JOB_RAIN_JM
  • Is
  • Li_jobno Number;
  • Begin
  • DBMS_JOB.SUBMIT (li_jobno, 'proc _ RAIN_JM; ', SYSDATE, 'trunc (SYSDATE + 1 )');
  • End;
  • The last item can be referenced as follows:

    'Trunc (SYSDATE + 1) 'At midnight every day )'

    Every morning 08:30 'trunc (SYSDATE + 1) + (8*60 + 30)/(24*60 )'

    NEXT _ DAY (TRUNC (SYSDATE), ''tuesday'') + 12/24 at every TUESDAY'

    'Trunc (LAST_DAY (SYSDATE) + 1) 'at midnight on the first day of each month )'

    'Trunc (ADD_MONTHS (SYSDATE + 2/24, 3), 'q')-100' at on the last day of each quarter'

    'Trunc (LEAST (NEXT_DAY (SYSDATE, ''saturday "), NEXT_DAY (SYSDATE," SUNDAY ") + (6*60 + 10) /(24*60 )'

    For Oracle JOB interval reference, here, li_jobno is its ID. You can stop this task using this ID. The last thing you want to say is not to execute it multiple times. You can manage it in it, if it is already running, it will not be SUBMIT

    Run 'sysdate + 1' every day'

    Run 'sysdate + 1/24 'every hour'

    Run 'sysdate + 10/(60*24) 'every 10 minutes )'

    Run 'sysdate + 30/(60*24*60) 'every 30 seconds )'

    Run 'sysdate + 7' once every week'

    No longer run the task and delete it NULL

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.