Skip to content

Instantly share code, notes, and snippets.

@Botffy
Created November 7, 2016 13:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Botffy/1cf89a0899a0111868cfb3d7a2c9f6a7 to your computer and use it in GitHub Desktop.
Save Botffy/1cf89a0899a0111868cfb3d7a2c9f6a7 to your computer and use it in GitHub Desktop.
DBMS_Scheduler example
job_name := dbms_scheduler.generate_job_name(prefix => 'Bilagr_');
dbms_scheduler.create_job (
job_name => job_name,
job_type => 'STORED_PROCEDURE',
job_action => 'Bilagr.Run',
start_date => Sysdate,
enabled => true,
auto_drop => true,
number_of_arguments => 2
);
dbms_scheduler.set_job_argument_value(
job_name => job_name,
argument_position => 1,
argument_value => :new.bill_run_no
);
dbms_scheduler.set_job_argument_value(
job_name => job_name,
argument_position => 2,
argument_value => 'bilagr'
);
-- but, this shit commits :/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment