OIM 11g - How to run a schedule task using API

Hi All,
May I know how i can run a schedule job in OIM 11g through API.I referred the below link but it is for 9.x version.I need the same functionality in 11g?.
Schedule Tasks
Thanks in advance.

Check this :
SchedulerService schService = oimClient.getService(SchedulerService.class);
schService.triggerNow("Second Demo Scheduled Task");
API Reference :
void triggerNow(java.lang.String jobName)
throws SchedulerException,
SchedulerAccessDeniedException
Runs the specified job
Parameters:
jobName - The job that is to be triggered
Throws:
SchedulerException - when an error occurs at the Quartz Engine or scheduler is not running.
SchedulerAccessDeniedException - This exception will be thrown if access permission for operation is not available to the user

Similar Messages

  • OIM 11g error while running the scheduler

    Hi All,
    we have created on few custom schedulers to carry out trustetd recon and doing the create , modify and delete operations on OIM entities. all were running fine earlier. Now we started facing the below error while running any scheduler. Please find the OIM diagonostic logs below.
    scheduler status is not changing to running and scheduler logs and events r also not getting generated. please find the logs below.
    2012-09-04T11:03:38.355+05:30] [oim_server1] [NOTIFICATION] [IAM-0080006] [oracle.iam.platform.kernel.impl] [tid: [ACTIVE].ExecuteThread: '7' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm] [ecid: 11d1def534ea1be0:5b04d370:1398fc0c0cc:-8000-0000000000000067,0] [APP: oim#11.1.1.3.0] Orchestration process moved to failed stage, and the corresponding error is - {0}[[
    oracle.iam.platform.kernel.EventFailedException: Operation - UNSCHEDULE that is submitted as part of the orchestration is not supported.
    Completed orchestration with action result - oracle.iam.platform.kernel.EventFailedException: Operation - UNSCHEDULE that is submitted as part of the orchestration is not supported.
    [2012-09-04T11:03:38.430+05:30] [oim_server1] [NOTIFICATION] [IAM-1010010] [oracle.iam.platform.authz.impl] [tid: [ACTIVE].ExecuteThread: '7' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm] [ecid: 11d1def534ea1be0:5b04d370:1398fc0c0cc:-8000-0000000000000067,0] [APP: oim#11.1.1.3.0] ********** Entering the Authorization Segment with parameters:: LoggedInUserId = 1, target resourceID = null, Feature = SCHEDULER, Action = JOB_MODIFY **********
    [2012-09-04T11:03:38.430+05:30] [oim_server1] [NOTIFICATION] [IAM-1010029] [oracle.iam.platform.authz.impl] [tid: [ACTIVE].ExecuteThread: '7' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm] [ecid: 11d1def534ea1be0:5b04d370:1398fc0c0cc:-8000-0000000000000067,0] [APP: oim#11.1.1.3.0] OES Results found in cache with Key F: SCHEDULERS: 1P: JOB_MODIFYOESDefinition
    [2012-09-04T11:03:38.431+05:30] [oim_server1] [NOTIFICATION] [IAM-1010021] [oracle.iam.platform.authz.impl] [tid: [ACTIVE].ExecuteThread: '7' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm] [ecid: 11d1def534ea1be0:5b04d370:1398fc0c0cc:-8000-0000000000000067,0] [APP: oim#11.1.1.3.0] Validating the Internal Obligations: [InternalObligation: name: noop, values: [true], convertToObligation: false, InternalObligation: name: noop, values: [true], convertToObligation: false]
    [2012-09-04T11:03:38.431+05:30] [oim_server1] [NOTIFICATION] [IAM-1010022] [oracle.iam.platform.authz.impl] [tid: [ACTIVE].ExecuteThread: '7' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm] [ecid: 11d1def534ea1be0:5b04d370:1398fc0c0cc:-8000-0000000000000067,0] [APP: oim#11.1.1.3.0] ---------- The list of Internal Obligation is satisfied, returning TRUE ----------
    [2012-09-04T11:03:38.431+05:30] [oim_server1] [NOTIFICATION] [IAM-1010026] [oracle.iam.platform.authz.impl] [tid: [ACTIVE].ExecuteThread: '7' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm] [ecid: 11d1def534ea1be0:5b04d370:1398fc0c0cc:-8000-0000000000000067,0] [APP: oim#11.1.1.3.0] ********** Exiting the Authorization Segment with result Decision :PERMIT[[
    Obligations from policy: **********
    [2012-09-04T11:03:38.598+05:30] [oim_server1] [NOTIFICATION] [IAM-0080013] [oracle.iam.platform.kernel.impl] [tid: [ACTIVE].ExecuteThread: '7' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm] [ecid: 11d1def534ea1be0:5b04d370:1398fc0c0cc:-8000-0000000000000067,0] [APP: oim#11.1.1.3.0] Kernel executing default validation with process id, event id, entity and operation 709,251.0.JobDetails.UPDATE
    [2012-09-04T11:03:38.875+05:30] [oim_server1] [NOTIFICATION] [IAM-0080014] [oracle.iam.platform.kernel.impl] [tid: [ACTIVE].ExecuteThread: '7' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm] [ecid: 11d1def534ea1be0:5b04d370:1398fc0c0cc:-8000-0000000000000067,0] [APP: oim#11.1.1.3.0] Kernel executing default action handler with process id, event id, entity and operation 709,251.2,295,568.JobDetails.UPDATE.entityId=null
    [2012-09-04T11:03:38.875+05:30] [oim_server1] [NOTIFICATION] [IAM-0080001] [oracle.iam.platform.kernel.impl] [tid: [ACTIVE].ExecuteThread: '7' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm] [ecid: 11d1def534ea1be0:5b04d370:1398fc0c0cc:-8000-0000000000000067,0] [APP: oim#11.1.1.3.0] An error occurred while executing the kernel event handler.[[
    oracle.iam.platform.kernel.EventFailedException: Operation - UPDATE that is submitted as part of the orchestration is not supported.
         at oracle.iam.platform.kernel.impl.EntityDefaultActionHandler.execute(EntityDefaultActionHandler.java:53)
    thanks.

    I got one similar issue before. In my case was with event handler. It was a sintax issue.
    Example:
    I wrote this: <action-handler Class="...
    instead of this: <action-handler class="...
    So, in your case III suggest you to check if have any plugin invalid syntax and re-import your schedule task plugin.
    <oimplugins xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <plugins pluginpoint=.....
    <plugin pluginclass= .....
    </plugin>
    Let me know if you have any doubt.
    I hope this helps,
    Thiago Leoncio.

  • How to Deploy the Scheduler Task OIM 11g

    Hi.
    I have deployed the scheduler task in OIM 11g and also I have configured the Scheduler task in OIM Admin Console. The Java Scheduler class was not invoked when I run the Scheduler task.
    I have done the following configuration to develop and deploy the scheduler task in OIM.
    1) Developing the Java Class File.
    package edu.sfsu.oim11g.scheduler;
    import java.util.HashMap;
    import oracle.iam.scheduler.vo.TaskSupport;
    import edu.sfsu.oim11g.logger.SfsuLogger;
    public class SfsuTrustedSourceReconciliation extends TaskSupport {
         //private Logger logger= Logger.getLogger(SfsuTrustedSourceReconciliation.class);
         private SfsuLogger logger= new SfsuLogger("SFSU-LOGGER");
         private String className=this.getClass().getCanonicalName();
         private String methodName="";
         public SfsuTrustedSourceReconciliation() {
              methodName="SfsuTrustedSourceReconciliation";
              debug("SfsuTrustedSourceReconciliation() Called");
         @Override
         public void execute(HashMap arg0) throws Exception {
              // TODO Auto-generated method stub
              methodName="execute";
              debug("SfsuTrustedSourceReconciliation Arguments "+arg0);
         @Override
         public HashMap getAttributes() {
              // TODO Auto-generated method stub
              return null;
         @Override
         public void setAttributes() {
              // TODO Auto-generated method stub
         private void debug(Object message)
              logger.info(className+" : "+methodName+" : "+message);
    2) Custom Scheduler XML File
    This file is located in
    /home/oracle/confg_files/schedulers/db/SfsuTrustedSourceReconciliation.xml
    <scheduledTasks xmlns="http://xmlns.oracle.com/oim/scheduler">
         <task>
         <name>SfsuTrustedSourceReconciliation</name>
              <class>edu.sfsu.oim11g.scheduler.SfsuTrustedSourceReconciliation</class>
              <description>Reconciliation IDSync Data</description>
              <retry>5</retry>
              <parameters>
                   <string-param required="true" encrypted="false" helpText="Source Data Source">Source Resource Data Source Name</string-param>
                   <string-param required="true" encrypted="false" helpText="Config Data Source">Config Resource Data Source Name</string-param>
                   <string-param required="true" encrypted="false" helpText="Reconciliation Type is Full Or Cincremental. Default is Incremental">Reconciliation Type</string-param>
                   <number-param required="true" encrypted="false" helpText="Max Records" >Max Records</number-param>
              </parameters>
         </task>
    </scheduledTasks>
    3) Plugin File Configuration.
    <?xml version="1.0" encoding="UTF-8"?>
    <oimplugins>
    <plugins pluginpoint="oracle.iam.platform.kernel.spi.EventHandler">
    <plugin pluginclass="edu.sfsu.oim11g.eventhandlers.SfsuPostProcessEventHandler" version="1.0" name="SfsuPostprocessExtension"/>
    </plugins>
    <plugins pluginpoint="oracle.iam.scheduler.vo.TaskSupport">
    <plugin pluginclass="edu.sfsu.oim11g.scheduler.SfsuTrustedSourceReconciliation" version="1.0" name="SfsuTrustedSourceReconciliation"/>
    </plugins>
    </oimplugins>
    The event handler is successfully deployed and working fine without any issue.
    4) making the scheduler jar file.
    5) Making the scheduler zip with the following directory format.
    plugin.xml
    lib/scheduler.jar
    6) Registering the Schedule task and event handler as a Plugin.
    ant -f pluginregistration.xml register
    7) Importing the SfsuTrustedSourceReconciliation.xml file into the MDS.
    7.1) weblogic.properties
    wls_servername=oim_server1
    application_name=oim
    metadata_from_loc=/home/oracle/configfiles/schedulers
    7.2) Running the weblogicImportMetadata.sh file
    It imported the SfsuTrustedSourceReconciliation.xml file into the MDS Schema and it is available in the MDS_PATH table in MDS schema
    Path_Name : SfsuTrustedSourceReconciliation.xml
    PATH_FULL : /db/SfsuTrustedSourceReconciliation.xml
    8) Imported the EventHandlers.xml file into the MDS Schema.
    9) Run the PurgeCache.sh file
    10) Restarted the OIM Server.
    11) Loggin into the OIM Admin Console and Created the Scheduler job based on the SfsuTrustedSourceReconciliation listed in the scheduler.
    12) Run the Scheduler job and log file entries are not logged into the log file. My Log File Configuration
    <log_handler name='sfsu-handler' level='FINEST' class='oracle.core.ojdl.logging.ODLHandlerFactory'>
    <property name='logreader:' value='off'/>
    <property name='path' value='/u01/app/wl-10.3.5.0/Oracle/Middleware/user_projects/domains/oim_domain/servers/oim_server1/logs/sfsu-connector.log'/>
    <property name='format' value='ODL-Text'/>
    <property name='useThreadName' value='true'/>
    <property name='locale' value='en'/>
    <property name='maxFileSize' value='5242880'/>
    <property name='maxLogSize' value='52428800'/>
    <property name='encoding' value='UTF-8'/>
    </log_handler>
    <logger name="SFSU-LOGGER" level="FINEST" useParentHandlers="false">
    <handler name="sfsu-handler"/>
    <handler name="console-handler"/>
    </logger>
    Is there any special configuration Do i need to do invoke my Scheduler Java Class File.
    Help is Greatly Appreciated.

    Seems like you did it all right but just piece which if you can modify and test. The plugin.xml has two artifacts eventhandler and the schduler. Can you try creating separate plugin.xml with one for the scheduler zipped up with /lib/scheduleClass.jar and test it?
    Just deregister everything before trying it and let us know how it goes.
    Also the logger as I see is a custom logger, so it is extending the OOTB Logger? Just put some sysouts in the code and check for those in the server out file to be sure.
    Edited by: bbagaria on Jul 22, 2011 5:15 PM

  • Creating a Scheduled Task using PowerShell v4

    So here is my question.  I'm trying/wanting to create a scheduled task using PowerShell v4 on Server 2012R2.  I want to task to run on the 1st day of every month.  The parameter for -Monthly -Day is not available.  I need to use PowerShell
    to create the Scheduled Task because the Task will be running with a group Managed Service Account credentials so the Scheduled Task can not be created via the Task Scheduler GUI.
    Thanks in Advance

    Here is a functioning task It can be easily edited in PowerShell or in notepad to alter the timing
    <?xml version="1.0" encoding="UTF-16"?>
    <Task version="1.1" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
    <RegistrationInfo>
    <Author>W8TEST\user01</Author>
    </RegistrationInfo>
    <Triggers>
    <CalendarTrigger>
    <StartBoundary>2014-06-04T21:31:32.0459499</StartBoundary>
    <Enabled>true</Enabled>
    <ScheduleByMonth>
    <DaysOfMonth>
    <Day>1</Day>
    <Day>12</Day>
    <Day>24</Day>
    </DaysOfMonth>
    <Months>
    <January />
    <February />
    <March />
    <April />
    <May />
    <June />
    <July />
    <August /
    <September />
    <October />
    <November />
    <December />
    </Months>
    </ScheduleByMonth>
    </CalendarTrigger>
    </Triggers>
    <Principals>
    <Principal id="Author">
    <RunLevel>LeastPrivilege</RunLevel>
    <UserId>W8TEST\jvierra</UserId>
    <LogonType>InteractiveToken</LogonType>
    </Principal>
    </Principals>
    <Settings>
    <DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>
    <StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
    <IdleSettings>
    <StopOnIdleEnd>true</StopOnIdleEnd>
    <RestartOnIdle>false</RestartOnIdle>
    </IdleSettings>
    <Enabled>true</Enabled>
    <Hidden>false</Hidden>
    <RunOnlyIfIdle>false</RunOnlyIfIdle>
    <WakeToRun>false</WakeToRun>
    <ExecutionTimeLimit>P3D</ExecutionTimeLimit>
    <Priority>7</Priority>
    </Settings>
    <Actions Context="Author">
    <Exec>
    <Command>notepad.exe</Command>
    <Arguments>test.txt</Arguments>
    <WorkingDirectory>c:\temp</WorkingDirectory>
    </Exec>
    </Actions>
    </Task>
    I have edited and reloaded the XML many, many times.  It works very nicely.
    ¯\_(ツ)_/¯

  • How to run report from form using run_object_report

    I AM USNING FORMS9I/REPORTS 9I , HOW TO RUN REPORT FROM FROM USING RUN_REPORT_OBJECT AND HOW
    TO PASS PARAMETER AS WE DID IN RUN_REPORTS PLEASE HELP ME

    here an example !
    I hope this example you can use it
    PROCEDURE pr_reporte IS
    BEGIN
    DECLARE
         repid REPORT_OBJECT;
    v_rep VARCHAR2(100);
    rep_status Varchar2(20);
    d1 DATE;
    d2 DATE;
    BEGIN
         d1 := :GLOBAL.DIA_INI;
         d2 := :GLOBAL.DIA_FIN;
         repid := find_report_object('rep_lab02');
         SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'p_fec_uno='||to_char((add_months(last_day(d1),-1) +1),'DD/MM/YYYY')||' '||
         'p_fec_dos='||to_char(d2,'DD/MM/YYYY'));
         SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'pdf');
         v_rep := RUN_REPORT_OBJECT(repid);
         rep_status := report_object_status(v_rep);
         WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED') LOOP
              rep_status := report_object_status(v_rep);
         END LOOP;
         IF rep_status = 'FINISHED' then
              WEB.SHOW_DOCUMENT('/reports/rwservlet/getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server=repserver','_blank');
         ELSE
              ventana('E','error reporte no encontrado','S');
         END IF;
    END;
    END;
    The 'rep_lab02' is the name of the report that you give in the node reports
    p_fec_uno and p_fec_dos they are the parameters in the report
    repserver is the name of server created with rwserver
    Greetings

  • Reassigning of task using API in OIM11g

    HI Folks,
    Can someone help me how to reassign task using API in OIM 11g?
    The request is created and assigned the task to xelsysadm by default.
    I want the task be reassigned to approvers group by retrieving all the pending task of xelsysadm.
    The issue here is tcRequestOperations is no longers works in 11g.
    I checked the RequestService API , it doesnt have a method of reassigning task.
    Are there any ways aside from using API?
    Hope you guys can help me here.
    thanks,

    You'll have to use SOA APIs for the same.

  • How to develop a web browser using API javatv?

    How to develop a web browser using API javatv?
    I'm tryin' to build a web browser using the API javaTv and
    I want to know if that is possible and if somebody already made this.
    This web browser will run a page developed in jsp.
    Thanks.

    You don't need JavaTV to write a web browser.
    Whichever Java platform you're using with JavaTV should provide enough.

  • Error while running custom schedule task.

    Hello,
    I have created a schedule task, when I am running the task from sysadmin, it wont show any error message.
    In diagnostic log, I got the below error
    [2012-11-29T07:00:18.507-08:00] [oim_server1] [ERROR] [] [oracle.iam.transUI.impl] [tid: OIMQuartzScheduler_Worker-7] [userId: oiminternal] [ecid: 80eeb34d89d5ed80:-1384f0e3:13b4bd4b64a:-8000-0000000000000005,1:29060] [APP: oim#11.1.2.0.0] ADP ClassLoader failed to load: com.cgc.iam.customconnector.ac.ReconAC
    Please help.
    Thanks
    sjit

    Make sure you have included the jar file containing the class - com.cgc.iam.customconnector.ac.ReconAC in OIM classpath.

  • Run a scheduled task on an Event?

    I want to run a PowerShell script that will 1) close outlook and 2) backup the users .PST to their Home drive, which is a network share.   When you look at the Triggers for
    scheduled tasks there is no trigger called "at log off"   I do see "begin the task on an Event".   so I've seen by Googling that the log off event ID can be 4647 or 538 (maybe more?)   But I don't see how
    to set this up.
    My questions are these:
    1.  how do you set this up as a trigger?  What do you enter for Log:  Source:  and Event ID:  ??
    2.  If you can launch a PowerShell script when event ID *user log off* is seen in EventLog is it already too late to copy something up to the network?  Meaning once the Log Off ID is seen in Event Log are all network sessions closed?  
    mqh7

    Hello mqh7,
    What is your current situation?
    Is this issue resolved?
    Best regards,
    Fangzhou CHEN
    Fangzhou CHEN
    TechNet Community Support

  • Create new schedule task using OIM API

    Hello,
    Steps for setting up eclipse :
    1)Create a new JAVA project.
    2)Right click on your newly created JAVA project & select properties.
    3)In Properties window select JavaBuildPath & select libraries tab.
    4)Click on AddExternalJar's button & add jar files from lib,ext folders of OIM client installation.
    5)Click OK.
    CODE<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<package oimscheduler;
    import java.util.HashMap;
    import java.util.Hashtable;
    import javax.naming.Context;
    import Thor.API.Operations.tcUserOperationsIntf;
    import Thor.API.Exceptions.tcAPIException;
    import Thor.API.Exceptions.tcChallengeNotSetException;
    import Thor.API.Exceptions.tcLoginAttemptsExceededException;
    import Thor.API.Exceptions.tcPasswordResetAttemptsExceededException;
    import Thor.API.Exceptions.tcUserAccountDisabledException;
    import Thor.API.Exceptions.tcUserAccountInvalidException;
    import Thor.API.Exceptions.tcUserAlreadyLoggedInException;
    import Thor.API.tcUtilityFactory;
    import com.thortech.xl.scheduler.tasks.SchedulerBaseTask;
    import com.thortech.xl.util.config.ConfigurationClient;
    public class Scheduler extends SchedulerBaseTask
         tcUtilityFactory ioUtilityFactory = null;
         @Override
         protected void execute()
              try
                   System.out.println("Executing Scheduler.....");
                   createConnection();
                   createUser();
                   System.out.println("Back In execute fn !!!");
              catch(Exception e)
                   System.out.println("Error In execute : "+e.toString());
         public void createConnection()
              try
                   System.setProperty("XL.HomeDir","D:\\Oracle\\OIM\\xellerate");
                   System.setProperty("java.security.policy","D:\\Oracle\\OIM\\xellerate\\config\\xl.policy");
                   System.setProperty("java.security.auth.login.config","D:\\Oracle\\OIM\\xellerate\\config\\authwl.conf");
                   System.setProperty("java.naming.provider.url","t3://localhost:7001 ");
                   System.out.println("Setting Configurations .....");
                   System.out.println("Starting .....");
                   ConfigurationClient.ComplexSetting config =
                   ConfigurationClient.getComplexSettingByPath("Discovery.CoreServer");
                   System.out.println("Login...");
                   Hashtable env = config.getAllSettings();
                   env.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
                   env.put("java.naming.provider.url","t3://localhost:7001");
                   ioUtilityFactory = new tcUtilityFactory(env,"xelsysadm","abcd1234");
              catch(tcAPIException ae)
                   System.out.println("Error In createConnection:tcAPIException "+ae.toString());
              catch(tcChallengeNotSetException cnse)
                   System.out.println("Error In createConnection:tcChallengeNotSetException "+cnse.toString());
              catch(tcLoginAttemptsExceededException laee)
                   System.out.println("Error In createConnection:tcLoginAttemptsExceededException "+laee.toString());
              catch(tcPasswordResetAttemptsExceededException praee)
                   System.out.println("Error In createConnection:tcPasswordResetAttemptsExceededException "+praee.toString());
    catch(tcUserAccountDisabledException uade)
         System.out.println("Error In createConnection:tcUserAccountDisabledException "+uade.toString());
    catch(tcUserAccountInvalidException uaie)
         System.out.println("Error In createConnection:tcUserAccountInvalidException "+uaie.toString());
    catch(tcUserAlreadyLoggedInException uale)
         System.out.println("Error In createConnection:tcUserAlreadyLoggedInException "+uale.toString());
              catch(Exception e)
                   System.out.println("Error In createConnection:Exception "+e.toString());
         public void createUser()
              System.out.println("<<< In createUser Fn >>>");
              try
                   tcUserOperationsIntf moUserUtility = (tcUserOperationsIntf)ioUtilityFactory.getUtility("Thor.API.Operations.tcUserOperationsIntf");
                   HashMap user = new HashMap();
                   user.put("Users.User ID","OIM-API-SCH");
                   user.put("Users.First Name","Oracle-SCH");
                   user.put("Users.Middle Name","JAVA-SCH");
                   user.put("Users.Last Name","SUN-SCH");
                   user.put("Organizations.Key","1");
                   user.put("Users.Role","Full-Time");
                   user.put("Users.Xellerate Type","End-User");
                   user.put("Users.Password","password");
                   long l = moUserUtility.createUser(user);
                   System.out.println("CreatingUser Done.....");
              catch(tcAPIException ae)
                   System.out.println("Error In createUser:tcAPIException "+ae.toString());
              catch(Exception e)
                   System.out.println("Error In createUser:Exception "+e.toString());
    After writing above code ,we have to create jar file.
    Steps To Be Follwed In OIM Design Console
    1)Copy jar file in ScheduleTask folder of your OIM server installation.
    2)Expand administration tree & select TaskScheduler.
    3)Create new task & in class name textfield we have to mention package.classname & mention appropriate values in other textfields & execute it.
    4)Check output.

    We need to override 2 methods while extending from SchedulerBaseTask i.e
    init() :- this method is run before execute by the scheduler .
    execute() :- is executed by the scheduler.
    Revised code :-
    package oimscheduler;
    import java.util.HashMap;
    import Thor.API.Operations.tcUserOperationsIntf;
    import Thor.API.Exceptions.tcAPIException;
    import com.thortech.xl.scheduler.tasks.SchedulerBaseTask;
    public class Scheduler extends SchedulerBaseTask
         tcUserOperationsIntf moUserUtility = null;
         @Override
         public void init()
              try
                   System.out.println("In Init");
                   moUserUtility = (tcUserOperationsIntf) this.getUtility("Thor.API.Operations.tcUserOperationsIntf");
              catch (tcAPIException e)
                   e.printStackTrace();
         protected void execute()
              try
                   System.out.println("Executing Scheduler.....");
                   createUser();
                   System.out.println("Back In execute fn !!!");
              catch(Exception e)
                   System.out.println("Error In execute : "+e.toString());
         public void createUser()
              System.out.println("<<< In createUser Fn >>>");
              try
                   HashMap user = new HashMap();
                   user.put("Users.User ID","OIM-API-SCH1");
                   user.put("Users.First Name","Oracle-SCH1");
                   user.put("Users.Middle Name","JAVA-SCH1");
                   user.put("Users.Last Name","SUN-SCH1");
                   user.put("Organizations.Key","1");
                   user.put("Users.Role","Full-Time");
                   user.put("Users.Xellerate Type","End-User");
                   user.put("Users.Password","password");
                   long l = moUserUtility.createUser(user);
                   System.out.println("CreatingUser Done.....");
              catch(tcAPIException ae)
                   System.out.println("Error In createUser:tcAPIException "+ae.toString());
              catch(Exception e)
                   System.out.println("Error In createUser:Exception "+e.toString());
    Edited by: Rahul Shah on Jul 11, 2011 4:16 AM

  • Run a scheduled task with pop up message

    I have an .hta script that will prompt a user to accept or cancel a shutdown command.  I can make a scheduled task via GPO but the popup box never shows on the users desktop if they are logged in...the computer just shuts down.  Now, I know this
    is because the task is set to run as BUILTIN\System user.  How can I make it so the popup window appears for the user?
    Windows 2008 R2 and Windows 7
    Thanks!

    After MS introduced Session 0 isolation, this is impossible on Vista and
    newer.
    sincerely, Martin
    NO THEY ARE NOT EVIL, if you know what you are doing:
    Good or bad GPOs?
    Wenn meine Antwort hilfreich war, freue ich mich über eine Bewertung! If my answer was helpful, I'm glad about a rating!
    The most under-thought thing Microsoft has done. Because of this Session 0, when in a TS session on a Windows 2008 R2 while using Smart Cards authentification and enabling the setting "Disconnect the session when the card is removed"
    from the reader, every single time you have a message stating that "Your session was disconnected by an administrator" when you remove the card from the reader. You don't have the same result if in a Windows 2003 R2 TS session, where the session simply disconnects
    as it should.
    If someone kindly solve this issue mentionned above, it would be the best thing ever happen to me. Because of this "bug", I cannot use smart card authentification on my Windows 2008 RDS cluster.
    " Never panic before reboot ! "

  • How can I Backup scheduled tasks in ARD?

    Hi,
    I run a number of scheduled tasks throughout the day and I am wondering how I copy these so that I can protect them?
    Thanks.
    Message was edited by: Host <to clarify Subject>

    Saved tasks are in the com.apple.RemoteDesktop.plist file. Back that up and you should be fine.
    Regards.

  • Opening Excel Workbook Fails when run from Scheduled Task on Windows Server 2008 Rw

    Hi,
    I have a little vbs script that instantiates the Excel.Application object and then opens a work book to perform some tasks on it. The script runs fine when run from the command line. When I attempt to run it as a scheduled task (it is supposed to update
    data that is pulled from a SQL Server at regular intervals), it fails with the following error:
    Microsoft Office Excel cannot access the file 'c:\test\SampleWorkbook.xlsm'. There are several possible reasons: .....
    The file does exist. The path reported in the error is correct. The account under which the task is running is the same account I use to run it from the command line. User Account Control is not enabled, and the task is set up to run with highest privileges.
    When I run the same script through the Task Scheduler from a Windows Server 2003 machine, it works without issue.
    I was just wondering if somebody on this forum has run into a similar issue in connection with Windows Server 2008 R2 and figured out what the magic trick is to make it work. I'm sure it is rights related, but I haven't quite figured out what which rights
    are missing.
    Thanks in advance for any advice you may have.

    This is truly killing me ... trying to get it working on Windows Server 2012 without success.
    I desperately need to automate running Excel macros in a "headless" environment, that is non-interactive, non-GUI, etc.
    I can get it to work using Excel.Application COM, either via VBScript or Powershell, successfully on many other Windows systems  in our environment - Windows Server 2008 R2, Windows 7 (32-bit), etc.,  -BUT-
    The two servers we built out for running our automation process are Windows Server 2012 (SE) - and it just refuses to run on the 2012 servers - it gives the messages below from VBScript and PowerShell, respectively- 
    I have tried uninstalling and re-installing several different versions of Microsoft Excel (2007 Standard, 2010 Standard, 2010 Professional Plus, 32-bit vs. 64-bit, etc.), but it makes no difference.
    Would be extremely grateful if any one out there has had any success in running Excel automation on Server 2012 in a non-interactive environment that they could share.
    ( I have tried adding the "%windir%\syswow64\config\systemprofile\desktop"
    folder, which did fix the issue for me when testing on Windows Server 2008 R2, but sadly did not resolve it on Windows Server 2012 )
    [VBScript error msg]
    Z:\TestExcelMacro.vbs(35, 1) Microsoft Office Excel: Microsoft Office Excel cannot
    access the file 'Z:\TestExcelMacro.xlsm'. There are several possible reasons:
    • The file name or path does not exist.
    • The file is being used by another program.
    • The workbook you are trying to save has the same name as a currently open work
    [Powershell error msg]
    Exception calling "Add" with "0" argument(s): "Microsoft Office Excel cannot open or save any more documents because th
    ere is not enough available memory or disk space.
     To make more memory available, close workbooks or programs you no longer need.
     To free disk space, delete files you no longer need from the disk you are saving to."
        + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
        + FullyQualifiedErrorId : ComMethodTargetInvocation
    You cannot call a method on a null-valued expression.
        + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
        + FullyQualifiedErrorId : InvokeMethodOnNull

  • OIM 11g: How to track the net result of a change?

    Is there any way in OIM 11g to track (by database key, unique identifier, etc.) the net result of a user change?
    For example, if I change the OIM user's password, is there any way to determine which "Change Password" or "Password Updated" tasks were generated as a result on the connectors?
    If there's nothing like that built in, has anybody implemented anything like this?
    Thanks.

    It looks like when using Requests, that the Request ID is propagated to any process task spawned as a result of the request.
    Is this a correct statement?

  • Question on Cimsession code running as Schedule task

    #I have a scheduled task running that calls a ps1 file to collect zone data. The task is set to run whether I'm logged in or not. I noticed that if I add -Cimsession to the code, it will only collect the data when I'm logged onto the machine where the Scheduled
    task is running from.
    Get-DnsServerStatistics -CimSession (Get-Content c:\serverlist.txt) -ZoneName test.local | Out-File -Append test.local.csv
    #However, when I change the code from -Cimsession to foreach, it collects data even if I'm not logged in. Is this an expected behaviour?
    foreach ($server in Get-Content c:\serverlist.txt) { Get-DnsServerStatistics -ComputerName $server -ZoneName test.local | Out-File -Append test.local.csv }
    99upgrade

    It is a sched task issue and not a scripting issue.  Post in the windows forum for guidance on creating tasks.
    Run when logged on is an option.  Uncheck it.
    ¯\_(ツ)_/¯

Maybe you are looking for

  • Email attachment name in sender mail adapter to the receiver file adapter

    HI , Ths is regarding email to file scenario. I am trying to create file (in rceiver file adapter) with the same name as the email attachment that i read from mail sender adapter. I want ro use adapter module for this. I could find from blogs that th

  • Mobile Me down yet again!!

    Looks like Mobile Me is down again! I just lost the connection and can't get back on to the site <www.me.com>

  • Cut and paste from one project to another.

    I am doing a  groop of project from  a trip . so they won't be so long i split it into 5 projects.  I now need to even them out a little.  How can I move some clips from on project   to the one before it or after it.  I have elements 11 and use windo

  • Work process in BW

    What does the UPD, UP2, SPO work processes do? What is the recommended number or is there any guidelines on how to decide on how many is optmal? Thanks

  • Always in black

    I cant find any colour changes from black, I looked in Jim's book and in help. I am very new to using expression web 4  after 12years using  FrontPage with my  personal site, I can copy and paste in colour and colour the background but cant find colo