Oracle creates a job and executes the stored procedure with parameters regularly

Create a stored procedure (insert a person’s name into the person table)

PROCEDURE INSERTPERSON(
                            name    IN VARCHAR2
                            ) AS
  BEGIN
    -- TODO: PROCEDURE TEST.INSERTPERSON Required implementation
    insert into person values (name);
    commit;
  END INSERTPERSON;

Create job

DECLARE  
X NUMBER;  --set jobid
BEGIN  
SYS.DBMS_JOB.SUBMIT  
( job => X ,
what => 'DECLARE
  name VARCHAR2(10):=''jax'';
BEGIN
  TEST.INSERTPERSON(name);
END;' ,
next_date => to_date('17-03-2021 14:21:41', 'dd-mm-yyyy hh24:mi:ss'),
interval => 'sysdate+1/24' ,
no_parse => TRUE  
);  
COMMIT;  
END;  

Execute job now

begin  
dbms_job.run(jobid);  
end; 

Query to create the right job

select * from user_jobs

Delete job


begin
   dbms_job.remove(4);--和select * from user_jobs; The value of the job in
end;     

Read More: