Work with Scheduled Tasks

This page describes built-in scheduled task tables and interfaces.
For user-defined scheduled tasks see the Jobs page.

Java API

  1. tcScheduleTaskOperationsIntf
  2. tcSchedulerOperationsIntf


  1. TSK - master table
  2. TSA - task attribute


  1. Task Scheduler.ClassName
  2. Task Scheduler.Name
  3. Task Scheduler.Disable
  4. Task Scheduler.Start Time
  5. Task Scheduler.Interval
  6. Task Scheduler.Frequency Type - one of constants, defined in oracle.iam.scheduler.impl.util.SchedulerConstants (None, No pre-defined schedule, Periodic, Cron, Single, DAILY, WEEKLY, MONTHLY, Monthly on given dates, Monthly on given weekdays, MONTHLYWEEKDAYS, YEARLY)
  7. Task Scheduler.Status
  8. Task Scheduler.Last Start Time - date in format yyyy-mm-dd hh:mm:ss
  9. Task Scheduler.Last Stop Time - date in format yyyy-mm-dd hh:mm:ss
  10. Task Scheduler.Next Start Time - date in format yyyy-mm-dd hh:mm:ss
  11. Task Scheduler.Max Retries
  12. Task Scheduler.Retry Count
  13. TSK_RETRY_COUNT - ???


tcSchedulerOperationsIntf operations = oimClient.getService(tcSchedulerOperationsIntf.class);
Map<String, String> attributes = new HashMap<String, String>();
attributes.put("Task Scheduler.Name", "Test");
attributes.put("Task Scheduler.ClassName", "");
attributes.put("Task Scheduler.Disable", "0");
attributes.put("Task Scheduler.Frequency Type", "Custom");
attributes.put("Task Scheduler.Start Time", "2012-05-30 00:00:00");
attributes.put("Task Scheduler.Interval", "30");
attributes.put("Task Scheduler.Status", "INACTIVE");
attributes.put("Task Scheduler.Max Retries", "5");
attributes.put("Task Scheduler.Retry Count", "0");
long result = operations.createScheduleTask(attributes);


tcSchedulerOperationsIntf operations = oimClient.getService(tcSchedulerOperationsIntf.class);


Find a task named "HR Recon"

tcSchedulerOperationsIntf operations = oimClient.getService(tcSchedulerOperationsIntf.class);
Map<String, String> conditions = new HashMap<String, String>();
conditions.put("Task Scheduler.Name", "HR Recon");
tcResultSet resultSet = operations.findScheduleTasks(conditions);


Task Scheduler.Name=HR Recon
Task Scheduler.Disable=0
Task Scheduler.Start Time=
Task Scheduler.Interval=0
Task Scheduler.Frequency Type=
Task Scheduler.Status=INACTIVE
Task Scheduler.Last Start Time=
Task Scheduler.Last Stop Time=
Task Scheduler.Next Start Time=
Task Scheduler.Max Retries=5
Task Scheduler.Retry Count=0

Find parameters

Find parameters of the Scheduled Task with the key=1 (Password Expiration Task in my installation).

tcSchedulerOperationsIntf service = oimclient.getService(tcSchedulerOperationsIntf.class);
Map criteria = new HashMap();
criteria.put("TSK_KEY", "1");
criteria.put("TSA_NAME", "Email Definition Name");
tcResultSet resultSet = service.findScheduleTaskAttributes(criteria);


Task Scheduler.Task Attributes.Key=1
Task Scheduler.Key=1
Task Scheduler.Task Attributes.Name=Email Definition Name
Task Scheduler.Task Attributes.Value=Password Expired

Tasks can be also exported with export API or oimtool, for example:

oimtool --export Jobs.xml Job '*'
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License