KM Scheduler Task - Service user

Dear all,
I created a scheduled task in the NWDS and deployed the par and configured the time table for it. The task is running every minute, so it's all working. Now i'm wondering, is it possible to set the user that executes the task somewhere? like in a service user or so.
I played around a bit in the portalapp.xml and it now looks like:
<?xml version="1.0" encoding="utf-8"?>
<application>
  <application-config>
    <property name="SharingReference" value="usermanagement, knowledgemanagement, landscape, htmlb, exportalJCOclient, exportal,SAPJ2EE::sap.com/ear~test"/>
    <property name="SecurityArea" value="Netweaver.portal"/>
    <property name="Vendor" value="sap.com"/>
  </application-config>
  <components/>
  <services>
    <service name="RFServiceWrapper">
      <service-config>
        <property name="className" value="com.sap.netweaver.rf.wrapper.RFServiceWrapper"/>
        <property name="startup" value="true"/>
        <property name="SafetyLevel" value="low_safety"/>
      </service-config>
    </service>
  </services>
</application>
In the run(..) method, i call an ejb, and in the ejb i print the username that's executing it. Sometimes it says it's executed by Guest (most of the times), and sometimes it says it's executed by Administrator...
What user is used for running the scheduled task? can it be a fixed user, as in "serviceUserX" for example? How do i configure that?
Kind regards.
J.
Message was edited by:
        Joren Crauwels
Message was edited by:
        Joren Crauwels

Hi
Did you find a solution fo this problem?
Florin

Similar Messages

  • CcmEval Scheduled task not being created with "Access Denied" error 0x80070005 only on XP machines

    Before coming on here I checked out http://social.technet.microsoft.com/Forums/en-US/ddbfe6c3-ee54-4b2a-a3a7-a6515d974f76/client-check-failed-on-xpserver-2003-systems-onlyccmeval-is-not-being-scheduled?forum=configmanagerdeployment (GPO
    to allow scheduled tasks by users) and another thread about a hotfix that seems to be pre-XP SP3 and pre-CM 2012 R2.
    That said, I'm having an issue many seem to have, but I can't find the answer. From what I understand SCCM uses the user context to create the CcmEval task, but in XP users cannot set a task to run as any other user (ie SYSTEM in this instance) so what is
    the workaround? I can't just give users Administrator permissions to install the client.
    The exact log entries are:
    <![LOG[Client evaluation task doesn't exist.]LOG]!><time="19:05:43.548+360" date="12-14-2013" component="CcmEvalTask" context="" type="2" thread="4356" file="ccmevalcheck.cpp:705">
    <![LOG[Client evaluation task is not found or is disabled or is not compliant, perform remediation]LOG]!><time="19:05:43.548+360" date="12-14-2013" component="CcmEvalTask" context="" type="2"
    thread="4356" file="ccmevalcheck.cpp:341">
    <![LOG[Attempting to recreate client evaluation task.]LOG]!><time="19:05:43.548+360" date="12-14-2013" component="CcmEvalTask" context="" type="1" thread="4356" file="ccmevalcheck.cpp:833">
    <![LOG[Task scheduler 2.0 is not supported, peform task registration with 1.0 API.]LOG]!><time="19:05:43.548+360" date="12-14-2013" component="CcmEvalTask" context="" type="1" thread="4356"
    file="ccmevaltask.cpp:345">
    <![LOG[Failed to delete task Configuration Manager Health Evaluation (0x80070002).]LOG]!><time="19:05:43.548+360" date="12-14-2013" component="CcmEvalTask" context="" type="2" thread="4356"
    file="ccmevaltask.cpp:379">
    <![LOG[Failed to create task item (0x80070005).]LOG]!><time="19:05:43.548+360" date="12-14-2013" component="CcmEvalTask" context="" type="3" thread="4356" file="ccmevaltask.cpp:387">
    <![LOG[Failed to create client evaluation task.]LOG]!><time="19:05:43.548+360" date="12-14-2013" component="CcmEvalTask" context="" type="2" thread="4356" file="ccmevalcheck.cpp:850">
    The bolded section is what's telling me it's Access Denied, and manual creation of any program task set to run as SYSTEM tells me the same- users cannot do this; only admins can.
    What can I do?

    So after sifting through some RSOP results and GPO objects I found a policy that wasn't necessarily prohibiting creation of them. (Not where you think it would be - under
    Administrative Templates > Windows Components > Task Scheduler > "Prohibit New Task Creation" -
    this was set to allow them) but this one I found was a File Permissions policy that set SYSTEM permissions to READ and EXECUTE.
    I've changed this to FULL CONTROL for SYSTEM. I'm unable to get on the machines to examine everything closely, but from what I can see at least one of them has remediated themselves and now has a successful client check in the console. Hopefully the rest
    of them will come around as GP updates itself and the client does an evaluation to remediate the Scheduled Task.
    Hopefully this helps someone in the future as well.

  • Group Policy - Computer preference - Schedule task creation

    Hello,
       We are getting error while applying schedule task creation GPO (from Windows 2012) to system windows 2008 R2.
    Group Policy object did not apply because it failed with error code '0x80041316 The task XML contains an unexpected node.' This error was suppressed.
    As recommended in many threads, we have made the settings to run the schedule task with user which is "NT Authority\System" (selected user manully from Damain -> Building group -> System).  After changing, we observe that task is getting
    created but we keep on getting warning messages in event viewer. In GPO ->  schedule task -> setting is to "update" schedule task (not create or replace).
    Below is excerpt from traces file while applying GP.
    -------2015-02-11 09:41:22.976 [pid=0x35c,tid=0x934] RunOnce value created [SUCCEEDED(S_FALSE)]
    2015-02-11 09:41:23.039 [pid=0x35c,tid=0x934] RunOnce value created [SUCCEEDED(S_FALSE)]
    2015-02-11 09:41:23.039 [pid=0x35c,tid=0x934] RunOnce value created [SUCCEEDED(S_FALSE)]
    2015-02-11 09:41:23.039 [pid=0x35c,tid=0x934] Read GPE XML data file (3146 bytes total).
    2015-02-11 09:41:23.039 [pid=0x35c,tid=0x934] RunOnce value created [SUCCEEDED(S_FALSE)]
    2015-02-11 09:41:23.070 [pid=0x35c,tid=0x934] RunOnce value created [SUCCEEDED(S_FALSE)]
    2015-02-11 09:41:23.085 [pid=0x35c,tid=0x934] Properties handled. [ hr = 0x80041316 "The task XML contains an unexpected node." ]
    2015-02-11 09:41:23.085 [pid=0x35c,tid=0x934] Error suppressed. [ hr = 0x80041316 "The task XML contains an unexpected node." ]
    2015-02-11 09:41:23.085 [pid=0x35c,tid=0x934] Completed get next GPO. [SUCCEEDED(S_FALSE)]
    2015-02-11 09:41:23.085 [pid=0x35c,tid=0x934] WQL : SELECT * FROM RSOP_PolmkrSetting WHERE polmkrBaseCseGuid = "{AADCED64-746C-4633-A97C-D61349046527}"
    2015-02-11 09:41:23.101 [pid=0x35c,tid=0x934] Purged 2 old RSoP entries.
    2015-02-11 09:41:23.101 [pid=0x35c,tid=0x934] Logging 2 new RSoP entries.
    2015-02-11 09:41:23.101 [pid=0x35c,tid=0x934] RSoP Entry 0
    2015-02-11 09:41:23.117 [pid=0x35c,tid=0x934] RSoP Entry 1
    2015-02-11 09:41:23.117 [pid=0x35c,tid=0x934] Completed get GPO list. [SUCCEEDED(S_FALSE)]
    Any input will be helpful.
    Thank you.

    Hi Martin,
      Please find it below
    <?xml version="1.0" encoding="UTF-8"?>
    -<ScheduledTasks clsid="{CC63F200-7309-4ba0-B154-A71CD118DBCC}">-<TaskV2 clsid="{D8896631-B747-47a7-84A6-C155337F3BC8}" removePolicy="0" userContext="0" uid="{1E0044F0-305A-48ED-A432-DDF4E5AB50BC}"
    changed="2015-02-11 09:07:27" image="2" name="AssetExplorer">-<Properties name="AssetExplorer" logonType="S4U" runAs="NT AUTHORITY\System" action="U">-<Task version="1.2">-<RegistrationInfo><Author>domain2\useradmin</Author><Description>Asset
    Explorer</Description></RegistrationInfo>-<Principals>-<Principal id="Author"><UserId>NT AUTHORITY\System</UserId><LogonType>S4U</LogonType><RunLevel>LeastPrivilege</RunLevel></Principal></Principals>-<Settings>-<IdleSettings><Duration>PT5M</Duration><WaitTimeout>PT1H</WaitTimeout><StopOnIdleEnd>false</StopOnIdleEnd><RestartOnIdle>false</RestartOnIdle></IdleSettings><MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy><DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries><StopIfGoingOnBatteries>false</StopIfGoingOnBatteries><AllowHardTerminate>false</AllowHardTerminate><AllowStartOnDemand>false</AllowStartOnDemand><Enabled>true</Enabled><Hidden>false</Hidden><ExecutionTimeLimit>P1D</ExecutionTimeLimit><Priority>7</Priority></Settings>-<Triggers>-<CalendarTrigger><StartBoundary>2015-02-05T23:00:00</StartBoundary><Enabled>true</Enabled>-<ScheduleByDay><DaysInterval>1</DaysInterval></ScheduleByDay><ExecutionTimeLimit>P1D</ExecutionTimeLimit></CalendarTrigger></Triggers>-<Actions
    Context="Author">-<Exec><Command>\\domain\NETLOGON\Global\mycommand.cmd</Command></Exec></Actions></Task></Properties></TaskV2> -<TaskV2 clsid="{D8896631-B747-47a7-84A6-C155337F3BC8}"
    removePolicy="0" userContext="0" uid="{0C27559B-07A6-4F36-A400-0D769B62BE93}" changed="2015-02-11 09:16:50" image="2" name="AssetExplorer">-<Properties name="AssetExplorer" logonType="S4U"
    runAs="NT AUTHORITY\System" action="U">-<Task version="1.1">-<RegistrationInfo><Author>domain2\useradmin</Author><Description>Asset Explorer</Description></RegistrationInfo>-<Principals>-<Principal
    id="Author"><UserId>NT AUTHORITY\System</UserId><LogonType>S4U</LogonType><RunLevel>LeastPrivilege</RunLevel></Principal></Principals>-<Settings>-<IdleSettings><Duration>PT5M</Duration><WaitTimeout>PT1H</WaitTimeout><StopOnIdleEnd>false</StopOnIdleEnd><RestartOnIdle>false</RestartOnIdle></IdleSettings><MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy><DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries><StopIfGoingOnBatteries>false</StopIfGoingOnBatteries><AllowHardTerminate>false</AllowHardTerminate><AllowStartOnDemand>false</AllowStartOnDemand><Enabled>true</Enabled><Hidden>false</Hidden><ExecutionTimeLimit>P1D</ExecutionTimeLimit><Priority>7</Priority></Settings>-<Actions
    Context="Author">-<Exec><Command>\\domain\NETLOGON\Global\mycommand.cmd</Command></Exec></Actions>-<Triggers>-<CalendarTrigger><StartBoundary>2015-02-05T23:00:00</StartBoundary><Enabled>true</Enabled>-<ScheduleByDay><DaysInterval>1</DaysInterval></ScheduleByDay><ExecutionTimeLimit>P1D</ExecutionTimeLimit></CalendarTrigger></Triggers></Task></Properties></TaskV2>
    </ScheduledTasks>

  • Powershell scheduled task & Excel

    Hey,
    I have created the following script which converts .xls to .csv file which I want to run as scheduled task.(it is a part of a bigger script)
    $Error.Clear()
    $LogFile = $MyInvocation.MyCommand.Definition + ".log"
    $TempFile = 'D:\ConfigMgr_Tools\Maintenance\CreateADStructure.xls'
    Start-Transcript $LogFile
    "Userprofile $env:USERPROFILE"
    #PREVENT ERROR: http://support.microsoft.com/kb/320369/en-us
    $OldCulture = [System.Threading.Thread]::CurrentThread.CurrentCulture
    $OldUICulture = [System.Threading.Thread]::CurrentThread.CurrentUICulture
    "Recieved cultures $OldCulture , $OldUICulture "
    # cultures to en-US
    [System.Threading.Thread]::CurrentThread.CurrentCulture = "en-US"
    [System.Threading.Thread]::CurrentThread.CurrentUICulture = "en-US"
    "Set cultures"
    $objExcel = New-Object -ComObject Excel.Application
    "Created excel object"
    $objworkbook = $objExcel.Workbooks.Open($TempFile)
    "Created workbook object"
    $CSVTempFile = $TempFile -replace ".xl\w*$",".csv"
    if(Test-path $CSVTempFile)
    Remove-Item -Path $CSVTempFile -Force | Out-Null
    Start-Sleep -Seconds 1
    "Removed old csv"
    $objworkbook.SaveAs($CSVTempFile,6) # 6 is the code for .CSV
    $objworkbook.Saved = $true
    "Saved workbook: $CSVTempFile"
    $objworkbook.Close($false)
    $objExcel.Quit()
    #$objExcel.Dispose
    Start-Sleep -Seconds 1
    Stop-Process -Name *EXCEL* -Force
    # reset cultures
    [System.Threading.Thread]::CurrentThread.CurrentCulture = $OldCulture
    [System.Threading.Thread]::CurrentThread.CurrentUICulture = $OldUICulture
    Stop-Transcript
    When I run the script from normal powershell it works without any problem.
    See Transcript output here:
    Windows PowerShell transcript start
    Start time: 20150403135125
    Username: MyDomain\SCCM_CMD
    RunAs User: MyDomain\SCCM_CMD
    Machine: SRV-SCCM02 (Microsoft Windows NT 6.3.9600.0)
    Host Application: powershell.exe -Command & {C:\Users\SCCM_CMD\Desktop\Untitled5.ps1} -executionpolicy Unrestricted
    Process ID: 11300
    Transcript started, output file is C:\Users\SCCM_CMD\Desktop\Untitled5.ps1.log
    Userprofile C:\Users\SCCM_CMD
    Recieved cultures de-DE , en-US
    Set cultures
    Created excel object
    Created workbook object
    Saved workbook: D:\ConfigMgr_Tools\Maintenance\CreateADStructure.csv
    Windows PowerShell transcript end
    End time: 20150403135129
    But when I start the script from scheduled task (using the same powershell.exe parameter) I receive
    following error:
    Exception calling "Open" with "1" argument(s): "Microsoft Excel cannot access
    the file 'D:\ConfigMgr_Tools\Maintenance\CreateADStructure.xls'. 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
    workbook."
    Here the whole transcript output:
    Windows PowerShell transcript start
    Start time: 20150403135143
    Username: MyDomain\SCCM_CMD
    RunAs User: MyDomain\SCCM_CMD
    Machine: SRV-SCCM02 (Microsoft Windows NT 6.3.9600.0)
    Host Application: powershell.exe -Command & {C:\Users\SCCM_CMD\Desktop\Untitled5.ps1} -executionpolicy Unrestricted
    Process ID: 10604
    Transcript started, output file is C:\Users\SCCM_CMD\Desktop\Untitled5.ps1.log
    Userprofile C:\Users\SCCM_CMD
    Recieved cultures de-DE , en-US
    Set cultures
    Created excel object
    Exception calling "Open" with "1" argument(s): "Microsoft Excel cannot access
    the file 'D:\ConfigMgr_Tools\Maintenance\CreateADStructure.xls'. 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
    workbook."
    At C:\Users\SCCM_CMD\Desktop\Untitled5.ps1:21 char:5
    + $objworkbook = $objExcel.Workbooks.Open($TempFile)
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ComMethodTargetInvocation
    Created workbook object
    Removed old csv
    You cannot call a method on a null-valued expression.
    At C:\Users\SCCM_CMD\Desktop\Untitled5.ps1:31 char:5
    + $objworkbook.SaveAs($CSVTempFile,6) # 6 is the code for .CSV
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull
    The property 'Saved' cannot be found on this object. Verify that the property
    exists and can be set.
    At C:\Users\SCCM_CMD\Desktop\Untitled5.ps1:32 char:5
    + $objworkbook.Saved = $true
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : PropertyNotFound
    Saved workbook: D:\ConfigMgr_Tools\Maintenance\CreateADStructure.csv
    You cannot call a method on a null-valued expression.
    At C:\Users\SCCM_CMD\Desktop\Untitled5.ps1:35 char:5
    + $objworkbook.Close($false)
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull
    Windows PowerShell transcript end
    End time: 20150403135147
    Any idea what can cause this?
    I already checked the file exists and there is a folder "desktop" for the user which runs the scheduled task (same user as in normal powershell)

    Just read the first error:
    Exception calling "Open" with "1" argument(s): "Microsoft Excel cannot access
    the file 'D:\ConfigMgr_Tools\Maintenance\CreateADStructure.xls'. 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
    workbook."
    Access is denied except when running elevated.  You need to be sure the account has access.
    Microsoft does not support or recommend using Excel in a non-interactive session.
    ¯\_(ツ)_/¯

  • Auto start web application in scheduler task

    hi expert,
    I 'd like to change an standard package in portal and run it in scheduler task, this is an application which is writte in HTMLB java.
    I have download the package and extract it in NWDS. This application obtains the parameters from URL , ie. via
    IPortalComponentRequest/IPortalComponentReponse component.
    Is it possible to runing this in scheduler task service? any experience where I shall start ?
    Many thanks
    Ben.J.

    hi, Sudha, thanks for ur reply, anyway, I have tried, but PITY me..still can't solve it, here's my code in app/web-inf/web.xml
    the "/home.jsp" stated below is my main page in the application,
    THANK U~
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
    "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
    <web-app>
    <servlet>
    <servlet-name>
    default
    </servlet-name>
    <jsp-file>
    /home.jsp
    </jsp-file>
    <load-on-startup>
    1
    </load-on-startup>
    </servlet>
    <welcome-file-list>
         <welcome-file>
    index.jsp
    </welcome-file>
         <welcome-file>
    index.html
    </welcome-file>
    <welcome-file>
    index.htm
    </welcome-file>
    <welcome-file>
    home.jsp
    </welcome-file>
    </welcome-file-list>
    </web-app>

  • Which solution is better for schedules task? Console application or windows service?

    I have a "MULTI-LEVEL" XML file that I will be getting on daily basis and I want to accomplish following tasks:
    1) I have to read and parse the "MULTI-LEVEL" XML data
    2) Then I have to set or create some kind of .net service (c#) that read the xml and parse the data once a day (daily)?
    3) Now I have SOAP service from other software where I want to feed this XML data to. The schedules service will compare the XML data with software data and update (or add) based on the comparision.
    For this task, I come to conclusion that there are 2 best ways to do this:
    1) Create a console application and use windows task scheduler to run it everyday
    2) Create a windows service that runs in the background
    Which is a better way (or reliable)  solution to do this task? Please advise

    There are several things to keep in mind when writing an app that is designed to run without a user logged in. One of the most common mistakes is requiring some sort of user input.  Since the task will run without user intervention you don't want
    any sort of calls to Console.ReadLine, MessageBox.Show, etc.  They will cause the task to freeze and eventually need to be terminated.  You also don't want to rely on any sort of desktop apps running since a user may or may not be logged on at the
    time.
    Also be aware that a task can be scheduled to run under any user context.  As such you either need to ensure it runs under an account with sufficient privileges or that your app needs no special privileges.  You mentioned you tried to run it from
    bin\debug but you most likely have your project under your Documents directory.  Only you would have permissions to that folder and therefore will run into issues if the task is run under a different context.  You also mentioned you put it in the
    C:\ but users don't have write privileges to that folder and therefore if you tried to write a file out it would fail. If you need to read/write files then you should pick a common location that all users have access to or at least the one that will run the
    scheduled task. Be aware that, by default, Task Scheduler will not run a task elevated. You need to check the option to run elevated when you configure the user to run the task under.
    One of the key things to ensure you do with a task is verify it is working properly as a normal app.  You should also ensure that you have good logging so that if it does fail you can trace down the failure more easily.  One common thing that people
    tend to do in console apps is put a try-catch around the main function and display a message if an unhandled exception occurs. This is going to cause problems in a task.  Simply log the exception and rethrow it so Task Scheduler will flag the run as a
    failure.
    If you still cannot figure out why your task is failing then please add some logging and then tell us what code is being run at the time and what the failure is.

  • Scheduled Task as Service Account - Failed to Start 2147943785

    I am attempting to run some powershell scripts that update membership of groups based on role attribute on users, then also grabs members of some groups and updates other groups with these members.
    I've delegated access through "security" to give this service account write:member and write:memberof for the Groups OU and write:memberof for the OUs containing the user accounts.
    I've updated my Default Domain Policy to give this service account Log On As Batch Job permissions.
    The scheduled task is running from a Domain Controller.
    When I attempt to run the task as the service account I receive the following:
    Task Scheduler failed to start "\SITE Role Membership" task for user "DOMAIN\GroupScripts$". Additional Data: Error Value: 2147943785.
    What am I missing here?

    Hi Allister,
    Please follow these steps t troubleshoot:
    Type "gpedit.msc", try to configure the following policy:
     [Computer Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment]
    1.  Log on as a batch job.
    2.  Allow log on locally.
    Add the service sccount domain\username to these two policies.
    Refer to:
    Task Scheduler failed to start - Additional
    Data: Error Value: 2147943785
    If there is anything else regarding this issue, please feel free to post back.
    Best Regards,
    Anna Wang

  • Deployed KM Scheduler Task Does Not Appear in Global Services / Scheduler T

    Hi All,
    I've deployed a portal service and a KM scheduler task in the same DC but cannot see the scheduler task listed under System Admin -> System Config -> Knowledge Management -> Content Management -> Global Services -> Scheduler Tasks.
    The service works correctly and performs its periodic processing once on initialisation of the service, and I can see the resulting log statements to make sure it has worked.
    Both the service and the scheduler task are packed inside the same DC, which builds and deploys without any errors.
    There are no errors in the log regarding the deployment of the DC, or the scheduler task.
    There is a log statement about registering the classloader for the DC, which I assume is the statement in the IRFServiceWrapper init() that goes:
    CrtClassLoaderRegistry.addClassLoader(this.getKey(), this.getClass().getClassLoader());
    But I still dont see the task listed in Global Services -> Scheduler Tasks.
    Does anyone know what might be causing this or how to diagnose the problem further?
    Cheers,
    Steve

    Hi Srini,
    No it doesn't it just has the run method which is generated automatically.
    I have created a local Portal Application project, which is not in a DC, and this also does not have a default constructor ether but appears in the Scheduler Tasks list as soon as it is deployed.
    I also tried to create a Portal Applicaiton DC and Portal Applicaiton (Packaged as SDA) DC and despite the scheduler task being the same, both the DC tasks do not appear in the Scheduler Tasks.
    The only one I can get to work is the local Portal Application project. This is no use as we cant store this in DTR (unless someone can explain how to do this???).
    The Portal Application project packages up the RF Framework JARS inside its PAR file, but the DC and SDA projects dont, so I tried including them via an Assembly Public Part to an External Library DC, which does include the JARs in the deployment files but they still dont appear in the Scheduler Tasks.
    Has anyone out there got a working Scheduler Task in a Portal Application DC?
    Cheers,
    Steve

  • Modifying/Updating User Defined Field in a Scheduled Task

    I've written a notification task to send an e-mail to a manager who has a contract employee with a contract that is about to expire.
    Once we isolate a user who has a contract about to expire, we send a notification to the manager. The date that the notification is sent out should be stored in the USR table in a user-defined field, "USR_UDF_LASTSENT."
    Updating this USR_UDF_LASTSENT field is where I'm having difficulty.
    I've tried using the UserManager in a couple of ways. Suppose I've isolated a single user using SearchCriteria and the UserManager and have a single User object called "currentUser." I want to store a Date object in the user defined field "USR_UDF_LASTSENT". Date today = new Date();
    I've tried: currentUser.setAttribute("USR_UDF_LASTSENT", today); //This will run without error, but when I check the DB there is no change to the attribute.
    With a defined instance of UserManager userManager, I've tried: userManager.modify("USR_UDF_LASTSENT", today, currentUser); //This errored out with this error - oracle.iam.identity.exception.NoSuchUserException: IAM-3054135:No user found for the criteria USR_UDF_LASTSENT-9/24/13 2:58 PM.:USR_UDF_LASTSENT:9/24/13 2:58 PM. It looks like it's doing a search rather than a modification.
    I've also tried using the entity manager in the following way:
    Date today = new Date();
    HashMap<String, Object> mapAttrs = new HashMap<String, Object>(); 
    mapAttrs.put("USR_UDF_LASTSENT", today); 
    EntityManager entMgr = Platform.getService(EntityManager.class); 
    entMgr.modifyEntity("User", currentUser.getEntityId(), mapAttrs);
    But it returns with this error: Failed: oracle.iam.platform.entitymgr.UnknownAttributeException: User : [USR_UDF_LASTSENT]
    Is my entityType, "User" inappropriate in this case? What should be used here?
    How can I Set or Update this user defined field from a scheduled task?

    Thanks guys. I did go to Identity System Administration console and chose 'Export' from under "System Managment" which I believe Kevin may have been hinting at. I got an xml export of the AttributeDefinitions for our user defined fields. In this file, there was a header for the attribute I was looking for:
    <AttributeDefinition repo-type="API" name="LastSent" subtype="User Metadata">
       <multiValued>
       <backendName>usr_udf_lastsent</backendName>
    I put the string "LastSent" in place of USR_UDF_LASTSENT in the EntityManager version of my attempt at this task. I believe this is what Kevin and delhi were getting at.
    This didn't work:
    Date today = new Date();
    HashMap<String, Object> mapAttrs = new HashMap<String, Object>(); 
    mapAttrs.put("USR_UDF_LASTSENT", today); 
    EntityManager entMgr = Platform.getService(EntityManager.class); 
    entMgr.modifyEntity("User", currentUser.getEntityId(), mapAttrs);
    But this did:
    Date today = new Date();
    HashMap<String, Object> mapAttrs = new HashMap<String, Object>(); 
    mapAttrs.put("LastSent", today); 
    EntityManager entMgr = Platform.getService(EntityManager.class); 
    entMgr.modifyEntity("User", currentUser.getEntityId(), mapAttrs);
    I wonder if currentUser.setAttribute("LastSent", today); would work... Hmm.

  • [Forum FAQ] Group Policy Preferences Scheduled Tasks Item not working when the option Run whether user is logged on or not is selected

    Scenario:
    We use one of the following Group Policy Preferences Scheduled Tasks item to deploy a task to clients:
    Computer Configuration -> Control Panel Settings -> Scheduled Tasks -> New -> Scheduled Task (At least Windows 7)
    Computer Configuration -> Control Panel Settings -> Scheduled Tasks -> New -> Immediate Task (At least Windows 7)
    User Configuration -> Control Panel Settings -> Scheduled Tasks -> New -> Scheduled Task (At least Windows 7)
    User Configuration -> Control Panel Settings -> Scheduled Tasks -> New -> Immediate Task (At least Windows 7)
    (Note that on some platforms, "At least Windows 7" is replaced with "Windows Vista and later.")
    After designating a user account to run the task, we select “Run whether user is logged on or not” option, and “The Do not store password…”
    check box is automatically grayed out (See Figure 1).
    Figure 1
    After finishing configuring the task item, on a client, we run command
    gpupdate/force to forcefully update group policy. However, on the client, when we check if the task is listed in Task Scheduler snap-in, the task is not displayed, and when we run
    gpresult/h report.html to collect group policy result for troubleshooting, we see an error as similar as shown in the following figure (Figure 2).
    Figure 2
    Cause:
    To make the scheduled task run whether the user is logged on or not, we need to store the password of the designated user account. However, for the content of the scheduled
    task item is stored in Sysvol where it’s not safe to store passwords, this function has been deprecated.
    Workaround:
    We can run the task with system account
    NT Authority\System, or we can use specific user accounts to run the task when the given user is logged on. (See Figure 3)
    Figure 3
    Reference:
    MS14-025: Vulnerability in Group Policy Preferences could allow elevation of privilege: May 13, 2014
    http://support.microsoft.com/kb/2962486
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    Hello Everyone,
    Succeeded !!!!!!!
    Even i was struggling with this same Problem to execute a batch via Window scheduler and set the setting to "Run whether the user is logged in or not".
    I tried many time but the batch runs with " Run
    whether user is logged on" and not with "Run
    whether user is logged on or not".
    what i discovered is that there was one mapped drive
    path in my batch file which was not the complete path like y:/AR.qvw actually what i did i changed that map path to the complete path like \\servnamename\d$\AR.qvw and the batch executed successfully with the setting "Run
    whether user is logged on or not"
    The
    conclusion is that check the dependency of the script on external resources because when you check this option "Run
    whether user is logged on or not" It actually conflicts. This my discovery.
    If
    you have any question write me on [email protected]
    Thanks
    & Regards,
    Arun

  • Schedule task - manager updation for user in oim 11g

    Hi,
    I am in the way of writing a custom schedule task to update manager for the user created in oim.
    I know the procedure of custom scedule task
    I want the code snipet to be written in the execute() method of java class to update the manager for the user
    Could anybody help me with this!

    Hi Gyanprakash,
    How will you retrieve the user detail ..?? i am getting null pointer exception error
    public void execute(HashMap taskParameters) {
    System.out.println("inside the Execute methode");
    System.out.println("Schedule task Arguments "+taskParameters);
    String userId = (String)taskParameters.get("User Login");
    System.out.println("===========input=============== "+userId);
    String passwordex=taskParameters.get("usr_pwd_expire_date").toString();
    System.out.println("===========input=============== "+passwordex);
    String passwordwar=taskParameters.get("usr_pwd_warn_date").toString();
    System.out.println("===========input=============== "+passwordwar);
    Thanks,
    Edited by: Srivatsa.kashyap on May 25, 2012 6:00 AM

  • Schedule Task - Windows 2008 R2 - User Session

    I am migratiing the schedule task from windows 2003 to windows 2008 and find some of behaviour change on handling user session by Task Scheduler.
    I have a simple batch to call "net use" command to map a network drive for copying file to remote server. And I have scheduled 3 similar tasks and run as same user (e.g. testuser)
    In windows 2003 enviornment, the mapped network drive resource will not be accessed by another schedule task. In windows 2008 R2, howerver, the network drive mapped in one of schedule task can be reached by another task. Does anyone have
    idea on this behaviour change?
    Here are the testing script
    Test Script 1
    NET USE >> D:\TEST1.LOG
    NET USE Z: \\127.0.0.1\Share /PERSISTENT:NO >> D:\TEST1.LOG
    ping 127.0.0.1 -n 100
    NET USE Z: /DELETE
    Test Script 2
    NET USE >> D:\TEST2.LOG
    NET USE Z: \\127.0.0.1\Share /PERSISTENT:NO >> D:\TEST1.LOG
    ping 127.0.0.1 -n 100
    NET USE Z: /DELETE
    Test Script 3
    NET USE >> D:\TEST3.LOG
    NET USE Z: \\127.0.0.1\Share /PERSISTENT:NO >> D:\TEST3.LOG
    ping 127.0.0.1 -n 100
    NET USE Z: /DELETE
    Output in Windows 2003
    Test1.LOG
    New connections will not be remembered.
    There are no entries in the list.
    The command completed successfully.
    z: was deleted successfully.
    Test2.LOG
    New connections will not be remembered.
    There are no entries in the list.
    The command completed successfully.
    z: was deleted successfully.
    Test3.LOG
    New connections will not be remembered.
    There are no entries in the list.
    The command completed successfully.
    z: was deleted successfully.
    Output in Windows 2008
    Test1.LOG
    New connections will not be remembered.
    There are no entries in the list.
    The command completed successfully.
    z: was deleted successfully.
    Test2.LOG
    New connections will not be remembered.
    Status       Local     Remote                    Network
    OK           Z:       
    \\127.0.0.1\Share          Microsoft Windows Network
    The command completed successfully.
    System error 85 has occurred.
    The local device name is already in use.
    The network connection could not be found.
    More help is available by typing NET HELPMSG 2250.
    Test3.LOG
    New connections will not be remembered.
    Status       Local     Remote                    Network
    OK           Z:       
    \\127.0.0.1\Share          Microsoft Windows Network
    The command completed successfully.
    System error 85 has occurred.
    The local device name is already in use.
    The network connection could not be found.
    More help is available by typing NET HELPMSG 2250.

    Sorry for confusing, I have udpated the script for this testing
    =====================================================
    Script for Schedule Task 1 - to map a network drive and issue a ping command to "sleep"
    Echo %date% %time% list drive on schedule task 1
    NET USE 
    Echo %date% %time% map drive on schedule task 1
    NET USE Z: \\127.0.0.1\Share /PERSISTENT:NO
    ping 127.0.0.1 -n 100 > NUL
    Echo %date% %time% remove drive on schedule task 1
    NET USE Z: /DELETE
    Script for Schedule Task 2 - to list out any network drive are mapped.
    Echo %date% %time% list drive on schedule task 2
    NET USE 
    ========================================================================
    The schedule task 2 are triggered while the schedule task 1 are running, In the windows 2003, the schedule task 2 could not list out any mapped drive. In the windows 2008, however, the schedule task 2
    can list the network drive mapped by schedule task 1. The question is if there are any changes between windows 2003 and 2008, hope it can clarify.
    Ouput on windows 2003
    Schedule task1
    D:\>Echo Wed 02/06/2013 18:31:52.93 list drive on schedule task 1
    Wed 02/06/2013 18:31:52.93 list drive on schedule task 1
    D:\>NET USE
    New connections will not be remembered.
    There are no entries in the list.
    D:\>Echo Wed 02/06/2013 18:31:52.98 map drive on schedule task 1
    Wed 02/06/2013 18:31:52.98 map drive on schedule task 1
    D:\>NET USE Z: \\127.0.0.1\Share /PERSISTENT:NO
    The command completed successfully.
    D:\>ping 127.0.0.1 -n 100 1>NUL
    D:\>Echo Wed 02/06/2013 18:33:32.07 remove drive on schedule task 1
    Wed 02/06/2013 18:33:32.07 remove drive on schedule task 1
    D:\>NET USE Z: /DELETE
    Z: was deleted successfully.
    Schedule Task 2
    d:\>Echo Wed 02/06/2013 18:32:22.54 list drive on schedule task 2
    Wed 02/06/2013 18:32:22.54 list drive on schedule task 2
    d:\>NET USE
    New connections will not be remembered.
    There are no entries in the list.
    Output on windows 2008
     Schedule task1
    C:\Windows\system32>Echo Wed 02/06/2013 18:17:52.13 list drive on schedule task 1
    Wed 02/06/2013 18:17:52.13 list drive on schedule task 1
    C:\Windows\system32>NET USE  
    New connections will not be remembered.
    There are no entries in the list.
    C:\Windows\system32>Echo Wed 02/06/2013 18:17:52.16 map drive on schedule task 1
    Wed 02/06/2013 18:17:52.16 map drive on schedule task 1
    C:\Windows\system32>NET USE Z: \\127.0.0.1\Share /PERSISTENT:NO 
    The command completed successfully.
    C:\Windows\system32>ping 127.0.0.1 -n 100 
    1>NUL
    C:\Windows\system32>Echo Wed 02/06/2013 18:19:32.59 remove drive on schedule task 1
    Wed 02/06/2013 18:19:32.59 remove drive on schedule task 1
    C:\Windows\system32>NET USE Z: /DELETE
    Z: was deleted successfully.
    Schedule task2
    C:\Windows\system32>Echo Wed 02/06/2013 18:18:07.69 list drive on schedule task 2
    Wed 02/06/2013 18:18:07.69 list drive on schedule task 2
    C:\Windows\system32>NET USE  
    New connections will not be remembered.
    Status       Local     Remote                    Network
    OK           Z:        \\127.0.0.1\Share        
    Microsoft Windows Network
    The command completed successfully.

  • Who scheduled a job with service user

    Hi,
    In my one of the system one job is running with service user. As service user cannot log into system. One of the dialog user logged in to system and scheduled one job with service user. this job is running more than 2 months. Now we want to know who is that dialog user scheduled this job with service user.  I have checked in job details it is not showing dialog user who has sheduelded first time.
    Pls someone help me in this case.
    Kind regards,
    Ram
    <subject_modified>
    Use a proper subject
    Read the "Rules of Engagement"
    Edited by: Juan Reyes on Jul 1, 2009 10:25 AM

    Just check the job owner.... If the Owner is the service user then most likely the user was changed to service user after the job creation. Also be aware that some jobs are generated by the system.
    Regards
    Juan

  • OIM - Understanding the scheduled-task User Operations

    Hi,
    Could anybody here explain what that task means?
    The manual says:
    This scheduled task performs the operation specified by the UserOperation attribute on the user account specified by the UserLogin attribute
    Does anybody here have an example of a scenario that this task could be useful?
    Regards
    HH

    Pretty simple. That scheduler is used to perform some actions on the OIM user account on a pre-defined schedule. That means you can perform ENABLE, DISABLE, or DELETE actions on any OIM user. And the attribute values could be:
    UserLogin - OIM User Login
    UserOperation - ENABLE
    The above scheduler run will enable the user if its disabled. Now the utility part. Consider the following use cases:
    *1)* You terminated any user, say User001 and you want to Disable this user and all its provisioned resources at 18:00 hours once he finishes all the office works, and if you directly Disable the user from Disable User button the User and all his resources would be gone immediately. So you can set this scheduler to run at 18:00 hours with the values User001 and DISABLE
    *2)* You are an OIM help-desk guy and OIM administrator doesn't want you to have access to menu item Users because he doesn't want you to have a look at the OIM user personal details but he still want that you can actually perform enable-disable actions on OIM. In such case he will give you access to Manage Schedule Task menu-item so that you can perform the daily operations activity. This will be a solution to the use-case.
    Thanks
    Sunny

  • AD User and Group Reconciliation Scheduled Task Error

    I am able to perform recon against an oracle database table, however, when I try to perform recon against AD users or groups, I get the following error. Has anyone ever seen a "java.sql.SQLException: Exhausted Resultset" error when running a scheduled task? Thanks in advance for any help!
    DEBUG,22 Oct 2007 17:19:53,937,[XELLERATE.SCHEDULER],triggerImpl : Trigger 'DEFAULT.ADGroupLookupReconTask': triggerClass: 'org.quartz.SimpleTrigger isVolatile: false calendar: 'null' misfireInstruction: 0
    DEBUG,22 Oct 2007 17:19:53,937,[XELLERATE.SCHEDULER],trigger Misfire instruction : MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_EXISTING_COUNT
    DEBUG,22 Oct 2007 17:19:53,937,[XELLERATE.SCHEDULER],Class/Method: QuartzSchedulerImpl/getQuartzTrigger left.
    DEBUG,22 Oct 2007 17:19:53,937,[XELLERATE.SCHEDULER],ADGroupLookupReconTask trigger is related to DEFAULT.ADGroupLookupReconTask and new job is DEFAULT.ADGroupLookupReconTask
    DEBUG,22 Oct 2007 17:19:53,937,[XELLERATE.SCHEDULER],Scheduling task : ADGroupLookupReconTask with trigger : Trigger 'DEFAULT.ADGroupLookupReconTask': triggerClass: 'org.quartz.SimpleTrigger isVolatile: false calendar: 'null' misfireInstruction: 5
    DEBUG,22 Oct 2007 17:19:53,953,[XELLERATE.SCHEDULER],Loading Scheduled task class com.thortech.xl.scheduler.core.quartz.QuartzWrapperusing ADP classloader
    DEBUG,22 Oct 2007 17:19:53,953,[XELLERATE.ADAPTERS],Class/Method: tcADPClassLoader/getClassLoader entered.
    DEBUG,22 Oct 2007 17:19:53,953,[XELLERATE.ADAPTERS],Class/Method: tcADPClassLoader/getClassLoader left.
    DEBUG,22 Oct 2007 17:19:53,968,[XELLERATE.SCHEDULER],Class/Method: QuartzSchedulerImpl/updateXellerateForTrigger entered.
    DEBUG,22 Oct 2007 17:19:53,968,[XELLERATE.SCHEDULER],Updating Trigger Details: lastStartTime : 2007-10-22lastStopTime : Mon Oct 22 17:19:53 CDT 2007nextStartTime : 2007-10-22
    DEBUG,22 Oct 2007 17:19:53,968,[XELLERATE.SCHEDULER],LefMethodDebug
    DEBUG,22 Oct 2007 17:19:53,968,[XELLERATE.SCHEDULER],Class/Method: QuartzSchedulerImpl/updateScheduledTask left.
    DEBUG,22 Oct 2007 17:21:48,015,[XELLERATE.SCHEDULER],Loading Scheduled task class com.thortech.xl.scheduler.core.quartz.QuartzWrapperusing ADP classloader
    DEBUG,22 Oct 2007 17:21:48,015,[XELLERATE.ADAPTERS],Class/Method: tcADPClassLoader/getClassLoader entered.
    DEBUG,22 Oct 2007 17:21:48,015,[XELLERATE.ADAPTERS],Class/Method: tcADPClassLoader/getClassLoader left.
    DEBUG,22 Oct 2007 17:21:48,015,[XELLERATE.SCHEDULER],Loading Scheduled task class com.thortech.xl.scheduler.core.quartz.QuartzWrapperusing ADP classloader
    DEBUG,22 Oct 2007 17:21:48,015,[XELLERATE.ADAPTERS],Class/Method: tcADPClassLoader/getClassLoader entered.
    DEBUG,22 Oct 2007 17:21:48,015,[XELLERATE.ADAPTERS],Class/Method: tcADPClassLoader/getClassLoader left.
    DEBUG,22 Oct 2007 17:21:48,078,[XELLERATE.SCHEDULER],Class/Method: SchedulerUtil/eventPreInsert entered.
    DEBUG,22 Oct 2007 17:21:48,078,[XELLERATE.SCHEDULER],Class/Method: SchedulerUtil/getSchedulerInstanc left.
    ERROR,22 Oct 2007 17:21:48,250,[XELLERATE.SERVER],Class/Method: QuartzWrapper/run encounter some problems: Exhausted Resultset
    java.sql.SQLException: Exhausted Resultset
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:175)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:240)
         at oracle.jdbc.driver.OracleResultSetImpl.getInt(OracleResultSetImpl.java:493)
         at oracle.jdbc.driver.OracleResultSet.getInt(OracleResultSet.java:1618)
         at com.thortech.xl.scheduler.core.quartz.QuartzWrapper.isTaskDisabled(Unknown Source)
         at com.thortech.xl.scheduler.core.quartz.QuartzWrapper.access$100(Unknown Source)
         at com.thortech.xl.scheduler.core.quartz.QuartzWrapper$TaskExecutionAction.run(Unknown Source)
         at Thor.API.Security.LoginHandler.oracleLoginSession.runAs(Unknown Source)
         at com.thortech.xl.scheduler.core.quartz.QuartzWrapper.execute(Unknown Source)
         at org.quartz.core.JobRunShell.run(JobRunShell.java:178)
         at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:477)

    Hi,
    I am getting the same error, You posted this thread on 10/22/07. Did you resolve this issue? Please share your solution.
    Thanks.
    Subhan

Maybe you are looking for

  • The Bad Press for iTunes 7 Is Starting to Roll In

    http://www.engadget.com/2006/09/14/itunes-7-turning-out-to-have-major-glitches/ Here's hoping for a patch PDQ!

  • Filtering the records of a table

    Dear Experts, I am trying to filter out the records of an output table from an RFC based on the values in one of the columns using the 'Filter' operator.The filter field is a numeric field.However the Filter input offers only four options by default

  • Org detemination when user attached to multiple profiles in IC webclient

    Hi, I am having a problem with org determination in IC webclient when a particular user is attached to multiple profiles. <u><b>The scenario is as follows:</b></u> 1. Log into IC webclient 2. Indentify and confirm an account 3. Select and confirm an

  • Disabling USB hard drives but allowing USB keys mounting, possible ?

    Hi all, I have a tricky request from one of my customers : they would like to block any external hard drives (firewire and USB) from mounting on the Desktop, BUT would like to allow USB keys only. All the clients are unmanaged (local accounts, NOT bo

  • [Solved]Uzbl in [] mode

    I started up uzbl-tabbed and the mode that it was in was []. Neither Cmd nor Ins. None of the commands worked. The only way i could kill it was by killing the uzbl-core process or by using the WM kill (Mod1+Shift+q) On the next startup, it used to op