Oracle Custom Job name, Job scheduler

Source: Internet
Author: User

begin--create_schedule dbms_scheduler.create_schedule (schedule_name='S_change_send_dates_statue', start_date=sysdate, Repeat_interval='freq=minutely; Interval=1', Comments='Customs side received enterprise data Change status schedule');    End Schedule_name: Specify the SCHEDULE name and note that the name cannot be duplicated. Start_date: Specifies the start time of the schedule, which can be empty and indicates that the schedule is temporarily not available when it is empty. Repeat_interval: Specifies the frequency or period of execution of the schedule. End_date: Specifies the end time of the schedule, which can be empty, which indicates that the schedule will continue.  COMMENTS: Comment information. This, compared with the technical content is the Repeat_interval parameter, for this parameter we should not be too unfamiliar, because the previous introduction of jobs, also mentioned the same name parameters, schedules in the Repeat_  The interval parameter is exactly the same as the Repeat_interval parameter in jobs, even if the parameter format is identical. The syntax structure of the Repeat_interval parameter is much more complex. The most important of these is the freq and interval two keywords. FREQ keyword is used to specify the time period of the interval, the optional parameters are: Yearly, MONTHLY, WEEKLY, DAILY, HOURLY, minutely, and secondly, respectively, representing the year, month, week, day, hour, minute, second and other units. The INTERVAL keyword is used to specify the frequent interval, the range of values that can be specified from 1- About. Begin--create_program Dbms_scheduler.create_program (program_name='P_change_send_dates_statue', Program_type='stored_procedure', Program_action='Sp_autosendcustom', Number_of_arguments=0, Enabled=TRUE, Comments='Automatic dispatch of Customs end');  End program_name: Specify a program name; the type of Program_type:program, as described in the previous article, the program supports three types; program_action: The actual operation should be performed with the previous PROGRAM_ The type parameter is associated with. For example, the previous designation Program_type"Plsql_block", then the action to be executed here should be a standard PL/SQL code. If Program_type is specified earlier as"stored_procedure", the action to be performed here should be a stored procedure defined in Oracle (with a Java stored procedure), if the previous specified Program_type is"executable", the command line information for the external command (with path information) should be specified here; number_of_arguments: Specifies the number of supported parameters and the default value is 0 without parameters. Each program can support up to 255 parameters, note that if Program_type is set to Plsql_block, this parameter is automatically ignored; enabled: Specifies whether to set the created program to a valid state, false by default.    comments: Don't say that again, note the information. Begin--create_job dbms_scheduler.create_job (job_name='J_change_send_dates_statue', Program_name='P_change_send_dates_statue', Schedule_name='S_change_send_dates_statue', Job_class='Default_job_class', Enabled=true, Auto_drop=true, Comments='Customs side received enterprise data Change status job'); End;
Dispatch Job

Oracle Custom Job name, Job scheduler

Related Article

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.