APEXtras

a development team dedicated to Oracle APEX

Oracle Scheduler Interface Calling Example (General Form)

with one comment

TYPE scheduler_arg_t is Record(
  argument_name VARCHAR2(100),
  argument_type VARCHAR2(100),
  default_value VARCHAR2(100),
  current_value VARCHAR2(4000)
  );
TYPE arglist_t is TABLE OF scheduler_arg_t INDEX BY PLS_INTEGER;
PROCEDURE ScheduleMyProcedure(p_P1  IN P1_TYPE,p_P2 IN P2_TYPE....,p_PN IN PN_TYPE) IS
    l_arglist arglist_t;
BEGIN
    l_arglist(1).argument_name := ‘p_P1';
    l_arglist(1).argument_type := ' P1_TYPE ';
    l_arglist(1).default_value := '';
    l_arglist(1).current_value := TO_CHAR(p_P1);
    l_arglist(2).argument_name := ‘p_P2';
    l_arglist(2).argument_type := ' P2_TYPE ';
    l_arglist(2).default_value := '';
    l_arglist(2).current_value := TO_CHAR(p_P2);
--Etc for every parameter p_P1...p_PN
  ScheduleSPJob(p_program_name       => 'MyProcedureName',
                p_argument_list      => l_arglist,
                p_schedule_date_time => NULL, -- Execute immediately
                p_force_recreate     => FALSE);
END;

Using the Oracle Scheduler in APEX

Written by Roger

14 May, 2009 at 3:58 pm

One Response

Subscribe to comments with RSS.

  1. […] The generalized form of the wrapper procedure. […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: