The job is actually in use. Use very much. The general user periodically runs certain functions, stored procedures, and so on.
Here's a look at how to create and start a job.
For example, a stored procedure is run with a job schedule.
Stored Procedure name: Pro_test_job
Operating interval: 2 hours,
SQL statements such as the following
Declare job number ; V_count number;begin SELECT Count (*) into v_count from user_jobs uj WHERE upper (uj.what) = UPPER (' pro_test_job; '); If V_count = 0 Then sys.dbms_job.submit (Job + job, what = ' pro_test_job; ', next_date = Sysdate, interval = ' sysdate+2/24 '); Dbms_job.run (Job); commit; End If;end;
Here are a few main parameters to illustrate.
Job-refers to the job ID, which is generated by itself.
The content of the what-job. Assume that a job with a number of parameters can be a script here.
Next_date-the next run time.
interval-operating frequency.
Here is the job without a reference, assuming that you need to enter a number of parameters how to write SQL, please see the next article.
ORACLE-005: Create Job (a)