PL/SQL API jcs.reschedule
Summary
- procedure reschedule(job_id in number, statuscode in varchar2, queue_name in varchar2, starttime in varchar2, time_window_name in varchar2, submit_frame_name in varchar2, priority in number, recurrence_data in varchar2, start_at_step in varchar2, queue_partition in varchar2, time_window_partition in varchar2, submit_frame_partition in varchar2, os_user in varchar2, status_on_submit in varchar2, repeat_with_parent in varchar2) (See overload function jcs.reschedule(job_id number,statuscode varchar2,queue_name varchar2,starttime timestamp with time zone,time_window_name varchar2,submit_frame_name varchar2,priority number,info varchar2,recurrence_data varchar2,start_at_step varchar2,queue_partition varchar2,time_window_partition varchar2,submit_frame_partition varchar2,os_user varchar2,statusOnSubmit varchar2,repeat_with_parent varchar2,original_requesttime timestamp with time zone) return number)
- function reschedule(job_id in number, statuscode in varchar2, queue_name in varchar2, starttime in varchar2, time_window_name in varchar2, submit_frame_name in varchar2, priority in number, info in varchar2, recurrence_data in varchar2, start_at_step in varchar2, queue_partition in varchar2, time_window_partition in varchar2, submit_frame_partition in varchar2, os_user in varchar2, status_on_submit in varchar2, repeat_with_parent in varchar2) return number (See overload function jcs.reschedule(job_id number,statuscode varchar2,queue_name varchar2,starttime timestamp with time zone,time_window_name varchar2,submit_frame_name varchar2,priority number,info varchar2,recurrence_data varchar2,start_at_step varchar2,queue_partition varchar2,time_window_partition varchar2,submit_frame_partition varchar2,os_user varchar2,status_on_submit varchar2,repeat_with_parent varchar2,original_requesttime timestamp with time zone) return number)
- procedure reschedule(job_id in number, statuscode in varchar2, queue_name in varchar2, starttime in date, time_window_name in varchar2, submit_frame_name in varchar2, priority in number, recurrence_data in varchar2, start_at_step in varchar2, queue_partition in varchar2, time_window_partition in varchar2, submit_frame_partition in varchar2, os_user in varchar2, status_on_submit in varchar2, repeat_with_parent in varchar2) (See overload function jcs.reschedule(job_id number,statuscode varchar2,queue_name varchar2,starttime timestamp with time zone,time_window_name varchar2,submit_frame_name varchar2,priority number,info varchar2,recurrence_data varchar2,start_at_step varchar2,queue_partition varchar2,time_window_partition varchar2,submit_frame_partition varchar2,os_user varchar2,status_on_submit varchar2,repeat_with_parent varchar2,original_requesttime timestamp with time zone) return number)
- function reschedule(job_id in number, statuscode in varchar2, queue_name in varchar2, starttime in date, time_window_name in varchar2, submit_frame_name in varchar2, priority in number, info in varchar2, recurrence_data in varchar2, start_at_step in varchar2, queue_partition in varchar2, time_window_partition in varchar2, submit_frame_partition in varchar2, os_user in varchar2, status_on_submit in varchar2, repeat_with_parent in varchar2) return number (See overload function jcs.reschedule(job_id number,statuscode varchar2,queue_name varchar2,starttime timestamp with time zone,time_window_name varchar2,submit_frame_name varchar2,priority number,info varchar2,recurrence_data varchar2,start_at_step varchar2,queue_partition varchar2,time_window_partition varchar2,submit_frame_partition varchar2,os_user varchar2,status_on_submit varchar2,repeat_with_parent varchar2,original_requesttime timestamp with time zone) return number)
- procedure reschedule(job_id in number, statuscode in varchar2, queue_name in varchar2, starttime in timestamp with time zone, time_window_name in varchar2, submit_frame_name in varchar2, priority in number, recurrence_data in varchar2, start_at_step in varchar2, queue_partition in varchar2, time_window_partition in varchar2, submit_frame_partition in varchar2, os_user in varchar2, status_on_submit in varchar2, repeat_with_parent in varchar2, original_requesttime in timestamp with time zone) (See overload function jcs.reschedule(job_id number,statuscode varchar2,queue_name varchar2,starttime timestamp with time zone,time_window_name varchar2,submit_frame_name varchar2,priority number,info varchar2,recurrence_data varchar2,start_at_step varchar2,queue_partition varchar2,time_window_partition varchar2,submit_frame_partition varchar2,os_user varchar2,status_on_submit varchar2,repeat_with_parent varchar2,original_requesttime timestamp with time zone) return number)
- function reschedule(job_id in number, statuscode in varchar2, queue_name in varchar2, starttime in timestamp with time zone, time_window_name in varchar2, submit_frame_name in varchar2, priority in number, info in varchar2, recurrence_data in varchar2, start_at_step in varchar2, queue_partition in varchar2, time_window_partition in varchar2, submit_frame_partition in varchar2, os_user in varchar2, status_on_submit in varchar2, repeat_with_parent in varchar2, original_requesttime in timestamp with time zone) return number (Parameter os_user unsupported. Parameter original_requesttime unsupported. Parameter info unsupported. Parameter start_at_step unsupported. Parameter status_on_submit unsupported. Parameter repeat_with_parent unsupported. )
Edit, kill, abort or restart the job.
The actions that are possible are dependent on the current status of the job.
- If the job is already finished, you can only restart the job.
- If the job is running, you can only kill the job.
- If the job has not run yet, you can change its parameters (both normal and scheduling), or abort it.
The function returns the job ID: if the returned job ID differs from the original one, the job has been restarted or resubmitted.
When a job is part of a recurrence and the recurrence pattern is set to NULL, the job is removed from the recurrence group and henceon treated as an individual job. You can edit any other schedule parameter while leaving the job in the recurrence group by setting recurrence_data to jcs.def_str. When you reset recurrence_data to some (other) value, the whole recurrence group will be modified. You cannot set submit_frame_name and recurrence_data at the same time.
To edit a job, you must call the following three routines in sequence:
- jcs.clear_parameters(job_id);
- jcs.parameter(object_name, parameter_name, value); ...
- jcs.reschedule(job_id);
The object_name must be in the format "
Killing a job using jcs.reschedule
jcs.reschedule(123,'K'); -- Kill running job 123
Rescheduling a job using jcs.reschedule
jcs.reschedule(123, starttime=>systimestamp + interval '7' day); -- reschedule for next week
Rescheduling a previously submitted job using jcs.reschedule
begin
host('echo hello world', starttime=>systimestamp + interval '7' days);
commit;
declare
jobid number := jcs.last_job_id;
begin
jcs.clear_parameters(jobid);
jcs.parameter('"SYSJCS"."HOST"', 'CMD', 'ls -l');
jcs.reschedule(jobid, starttime=>systimestamp);
jcs_output.put_line('Edited and rescheduled ' || jobid);
end;
end;
Specification
procedure reschedule(job_id in number,
statuscode in varchar2 default const.def_str,
queue_name in varchar2 default const.def_str,
starttime in varchar2,
time_window_name in varchar2 default const.def_str,
submit_frame_name in varchar2 default const.def_str,
priority in number default const.def_num,
recurrence_data in varchar2 default const.def_str,
start_at_step in varchar2 default const.def_str,
queue_partition in varchar2 default null,
time_window_partition in varchar2 default null,
submit_frame_partition in varchar2 default null,
os_user in varchar2 default const.def_str,
status_on_submit in varchar2 default const.def_str,
repeat_with_parent in varchar2 default const.def_str)
Reschedules the job.
Parameters
- job_id - The ID of the job
- statuscode - The new job status
- queue_name - The name of the queue where the job should be run in
- starttime - The new job start date and time
- time_window_name - The new time window during which the job should start
- submit_frame_name - The new submit frame for repeating the job
- priority - Priority 1-100, higher has precedence; only has relevance if the resources or queue size is limited
- recurrence_data - The recurrence data for the job
- start_at_step - start at a specific step in a job chain
- queue_partition - the name of the queue that the job should run in If it is not filled in the default partition is assumed
- time_window_partition - the partition of the time window that the job should start in If it is not filled in the default partition is assumed
- submit_frame_partition - the partition of the submit frame that decides how to repeat the job If it is not filled in the default partition is assumed
- os_user - the name of the OS user under which the job should run
- status_on_submit - which status should the job have when its step can start running (only for chain calls)
- repeat_with_parent - should the destination be repeated when the parent is repeated (only for destination jobs)
Transaction keyword
The transaction keyword defines how and/or when the changes are committed to the database. A definition of the various transaction keywords can be found on the jcs package summary page.
blocks commits database_modified autonomous
Specification
function reschedule(job_id in number,
statuscode in varchar2 default const.def_str,
queue_name in varchar2 default const.def_str,
starttime in varchar2,
time_window_name in varchar2 default const.def_str,
submit_frame_name in varchar2 default const.def_str,
priority in number default const.def_num,
info in varchar2 default const.jcs_no,
recurrence_data in varchar2 default const.def_str,
start_at_step in varchar2 default const.def_str,
queue_partition in varchar2 default null,
time_window_partition in varchar2 default null,
submit_frame_partition in varchar2 default null,
os_user in varchar2 default const.def_str,
status_on_submit in varchar2 default const.def_str,
repeat_with_parent in varchar2 default const.def_str)
return number
Reschedules the job and returns the new job id.
Parameters
- job_id - The ID of the job
- statuscode - The new job status
- queue_name - The name of the queue where the job should be run in
- starttime - The new job start date and time
- time_window_name - The new time window during which the job should start
- submit_frame_name - The new submit frame for repeating the job
- priority - Priority 1-100, higher has precedence; only has relevance if the resources or queue size is limited
- info - Y = just perform reschedule/edit checking, N = normal
- recurrence_data - The recurrence data for the job
- start_at_step - start at a specific step in a job chain
- queue_partition - the name of the queue that the job should run in If it is not filled in the default partition is assumed
- time_window_partition - the partition of the time window that the job should start in If it is not filled in the default partition is assumed
- submit_frame_partition - the partition of the submit frame that decides how to repeat the job If it is not filled in the default partition is assumed
- os_user - the name of the OS user under which the job should run
- status_on_submit - which status should the job have when its step can start running (only for chain calls)
- repeat_with_parent - should the destination be repeated when the parent is repeated (only for destination jobs)
- returns number - new job ID
Specification
procedure reschedule(job_id in number,
statuscode in varchar2 default const.def_str,
queue_name in varchar2 default const.def_str,
starttime in date,
time_window_name in varchar2 default const.def_str,
submit_frame_name in varchar2 default const.def_str,
priority in number default const.def_num,
recurrence_data in varchar2 default const.def_str,
start_at_step in varchar2 default const.def_str,
queue_partition in varchar2 default null,
time_window_partition in varchar2 default null,
submit_frame_partition in varchar2 default null,
os_user in varchar2 default const.def_str,
status_on_submit in varchar2 default const.def_str,
repeat_with_parent in varchar2 default const.def_str)
Reschedules the job
Parameters
- job_id - The ID of the job
- statuscode - The new job status
- queue_name - The name of the queue where the job should be run in
- starttime - The new job start date and time
- time_window_name - The new time window during which the job should start
- submit_frame_name - The new submit frame for repeating the job
- priority - Priority 1-100, higher has precedence; only has relevance if the resources or queue size is limited
- recurrence_data - The recurrence data for the job
- start_at_step - start at a specific step in a job chain
- queue_partition - the name of the queue that the job should run in If it is not filled in the default partition is assumed
- time_window_partition - the partition of the time window that the job should start in If it is not filled in the default partition is assumed
- submit_frame_partition - the partition of the submit frame that decides how to repeat the job If it is not filled in the default partition is assumed
- os_user - the name of the OS user under which the job should run
- status_on_submit - which status should the job have when its step can start running (only for chain calls)
- repeat_with_parent - should the destination be repeated when the parent is repeated (only for destination jobs)
Specification
function reschedule(job_id in number,
statuscode in varchar2 default const.def_str,
queue_name in varchar2 default const.def_str,
starttime in date,
time_window_name in varchar2 default const.def_str,
submit_frame_name in varchar2 default const.def_str,
priority in number default const.def_num,
info in varchar2 default const.jcs_no,
recurrence_data in varchar2 default const.def_str,
start_at_step in varchar2 default const.def_str,
queue_partition in varchar2 default null,
time_window_partition in varchar2 default null,
submit_frame_partition in varchar2 default null,
os_user in varchar2 default const.def_str,
status_on_submit in varchar2 default const.def_str,
repeat_with_parent in varchar2 default const.def_str)
return number
Reschedules the job and returns the new job id.
Parameters
- job_id - The ID of the job
- statuscode - The new job status
- queue_name - The name of the queue where the job should be run in
- starttime - The new job start date and time
- time_window_name - The new time window during which the job should start
- submit_frame_name - The new submit frame for repeating the job
- priority - Priority 1-100, higher has precedence; only has relevance if the resources or queue size is limited
- info - Y = just perform reschedule/edit checking, N = normal
- recurrence_data - The recurrence data for the job
- start_at_step - start at a specific step in a job chain
- queue_partition - the name of the queue that the job should run in If it is not filled in the default partition is assumed
- time_window_partition - the partition of the time window that the job should start in If it is not filled in the default partition is assumed
- submit_frame_partition - the partition of the submit frame that decides how to repeat the job If it is not filled in the default partition is assumed
- os_user - the name of the OS user under which the job should run
- status_on_submit - which status should the job have when its step can start running (only for chain calls)
- repeat_with_parent - should the destination be repeated when the parent is repeated (only for destination jobs)
- returns number - new job ID
Specification
procedure reschedule(job_id in number,
statuscode in varchar2 default const.def_str,
queue_name in varchar2 default const.def_str,
starttime in timestamp with time zone default const.def_tstamp,
time_window_name in varchar2 default const.def_str,
submit_frame_name in varchar2 default const.def_str,
priority in number default const.def_num,
recurrence_data in varchar2 default const.def_str,
start_at_step in varchar2 default const.def_str,
queue_partition in varchar2 default null,
time_window_partition in varchar2 default null,
submit_frame_partition in varchar2 default null,
os_user in varchar2 default const.def_str,
status_on_submit in varchar2 default const.def_str,
repeat_with_parent in varchar2 default const.def_str,
original_requesttime in timestamp with time zone default const.def_tstamp)
Reschedules the job
Parameters
- job_id - The ID of the job
- statuscode - The new job status
- queue_name - The name of the queue where the job should be run in
- starttime - The new job start date and time
- time_window_name - The new time window during which the job should start
- submit_frame_name - The new submit frame for repeating the job
- priority - Priority 1-100, higher has precedence; only has relevance if the resources or queue size is limited
- recurrence_data - The recurrence data for the job
- start_at_step - start at a specific step in a job chain
- queue_partition - the name of the queue that the job should run in If it is not filled in the default partition is assumed
- time_window_partition - the partition of the time window that the job should start in If it is not filled in the default partition is assumed
- submit_frame_partition - the partition of the submit frame that decides how to repeat the job If it is not filled in the default partition is assumed
- os_user - the name of the OS user under which the job should run
- status_on_submit - which status should the job have when its step can start running (only for chain calls)
- repeat_with_parent - should the destination be repeated when the parent is repeated (only for destination jobs)
- original_requesttime - allows you to change a job's original request time
Specification
function reschedule(job_id in number,
statuscode in varchar2 default const.def_str,
queue_name in varchar2 default const.def_str,
starttime in timestamp with time zone default const.def_tstamp,
time_window_name in varchar2 default const.def_str,
submit_frame_name in varchar2 default const.def_str,
priority in number default const.def_num,
info in varchar2 default const.jcs_no,
recurrence_data in varchar2 default const.def_str,
start_at_step in varchar2 default const.def_str,
queue_partition in varchar2 default null,
time_window_partition in varchar2 default null,
submit_frame_partition in varchar2 default null,
os_user in varchar2 default const.def_str,
status_on_submit in varchar2 default const.def_str,
repeat_with_parent in varchar2 default const.def_str,
original_requesttime in timestamp with time zone default const.def_tstamp)
return number
Reschedules the job and returns the new job id.
Parameters
- job_id - The ID of the job
- statuscode - The new job status
- queue_name - The name of the queue where the job should be run in
- starttime - The new job start date and time
- time_window_name - The new time window during which the job should start
- submit_frame_name - The new submit frame for repeating the job
- priority - Priority 1-100, higher has precedence; only has relevance if the resources or queue size is limited
- info - Y = just perform reschedule/edit checking, N = normal
- recurrence_data - The recurrence data for the job
- start_at_step - start at a specific step in a job chain
- queue_partition - the name of the queue that the job should run in If it is not filled in the default partition is assumed
- time_window_partition - the partition of the time window that the job should start in If it is not filled in the default partition is assumed
- submit_frame_partition - the partition of the submit frame that decides how to repeat the job If it is not filled in the default partition is assumed
- os_user - the name of the OS user under which the job should run
- status_on_submit - which status should the job have when its step can start running (only for chain calls)
- repeat_with_parent - should the destination be repeated when the parent is repeated (only for destination jobs)
- original_requesttime - allows you to change a job's original request time
- returns number - new job ID
See Also
plsqlTopic
onsiteTopic