services that run via scheduled task

Hi all

I am creating a task scheduled to start/stop services. the scheduled task must be run under the service account with minimal rights, as rights of the user or the user rights of maximum power.
I created the scheduled task running under the account of service with power user rights to stop a service, but unfortunately the task was doing what it suppose to do.
I did some troubleshooting and investigated as shown below:
1. I used the runas command to run net stop under the service account that runs the scheduled task, the service is stopped, as it is assumed
2. I connect to the server using the account service and disconnected (the session will be shown in the disk for the service account) and at the same time open a session to the server with a different account performed the scheduled task, the task does what it is supposed to do. (the service is stopped)
Note: the scheduled task is set to enabled (scheduled task to run at a specified time)
3 when I changed the rights on behalf of rights of administrator power user rights service and perform scheduled task, the task runs correctly and does what he must do.
4. the service was set to be managed by the user with power, which means that if a user opens a session on the server and try to start/stop the service, he will be able to action and is successful.
my questions will be as shown below:
1. to start/stop the service via a scheduled task, the service account needs a session to be able to perform the task?
2 must. the service account the highest privileges to perform the task?
3. is there a way to avoid to run the scheduled task to run with minimum privileges? What kind of things need to be done.
Thanks in advance for your answer.

I would look at the link below.  This should answer all these questions.

http://www.Microsoft.com/resources/documentation/Windows/XP/all/proddocs/en-us/sag_tsconcepts03.mspx?mfr=true

Tags: Windows

Similar Questions

  • IOM api to run a scheduled task

    Hello

    I use OIM 11.1.2.2.

    I run a scheduled task with the api and a failed idea. I saw this api Thor.API.Operations.tcuserOperationsIntf and that have what I need.

    Can you help me?

    SchedulerService (Oracle Fusion Middleware Java QAnywhere for Oracle Identity Manager), APIs will do it.

    triggerNow

    void triggerNow(java.lang.String jobName) throws SchedulerException, SchedulerAccessDeniedException
    
    Runs the specified job
    Parameters:
    jobName-The work that needs to be triggered
    Throws:
    SchedulerException -when an error occurs in the Quartz engine or Scheduler is not running.
    SchedulerAccessDeniedException -This exception will be thrown if the access permission for the operation is not available for the user

    -Kevin

  • How to run a scheduled task in specific (current) edition

    11.2.0.3

    I use redefinition of the basis for the development of a database. So far, the experiences have been good with it.

    We have three editions: ORA$ BASE = > BETA = > ALPHA

    BETA is the default edition. Development of new packages for this in ALPHA and then copied to the BETA and ORA$ BASE.

    We now want to carry out certain activities of pl/sql running for a long time as a background task.

    However. When we create a job regular db in ALPHA, it will run in the DEFAULT edition (BETA).

    I want to run a scheduled task in the same edition, where it was created from.

    It is a way to run configure a job normal regular db to execute in a specific edition?

    Example/demo

    -- test case run dbms_job as background 
    execute dbms_application_info.set_module('UT10_START_SESSION',null);
    execute dbms_application_info.set_client_info(sys_context('userenv','current_edition_name'));
    
    

    This test of construction scenario helped me narrow down the problem and find a solution.

    I need to perform the task with a dedicated job class. Job classes can add a service_name. The name of service in turn can be connected to a specific edition.

    first prepare the job classes

    ---Run as DBA
    begin
      dbms_scheduler.create_job_class (
       job_class_name => 'JCED_DEV$ALPHA',
       service        => 'ALPHA'
       );
    end;
    /
    
    begin
      dbms_scheduler.create_job_class (
       job_class_name => 'JCED_DEV$BETA',
       service        => 'BETA'
       );
    end;
    /
    
    begin
      dbms_scheduler.create_job_class (
       job_class_name => 'JCED_ORA$BASE',
       service        => 'BASE'
       );
    end;
    /
    
    grant execute any class to targetuserschema;
    

    Service names were already in place (you can use dbms_service to create a service based from version 11.2.0 edition.3).

    -- test case run dbms_job as background
    declare
      v_jobname   varchar2(30) := 'TestEditioning_UT10' ;
      v_starttime timestamp := systimestamp;
    begin
      dbms_scheduler.create_job(job_name            => v_jobname,
                                job_type            => 'PLSQL_BLOCK',
                                job_action          => q'[begin
      dbms_application_info.set_module('UT10_BACKGROUND_SESSION',null);
      dbms_application_info.set_client_info(sys_context('userenv','current_edition_name'));
      dbms_lock.sleep(60);
    end;
    ]',
                                job_class           => 'JCED_'||sys_context('userenv','current_edition_name'),
                                number_of_arguments => 0,
                                start_date          => v_starttime,
                                enabled             => FALSE,
                                auto_drop           => true);
    
      dbms_scheduler.enable(v_jobname);
    end;
    /
    commit;
    

    SID CLIENT_INFO SERVICE_NAME LOGON_TIME ACTION MODULE

    250 UT10_START_SESSION DEV$ ALPHA ALPHA 17.07.14 10:28:32

    251 UT10_BACKGROUND_SESSION DEV$ ALPHA ALPHA 17.07.14 16:23:26

    Success!

  • Need to update a user existing in the IOM by running the scheduled task.

    Hi all

    I configured the GTC connector for flat file with which I am able to create users in the IOM successfully. Here is an example of flat file

    ##hRDB
    UserID, firstname, lastname, Manager, EmployeeType, Org, role, service, location, position
    AWinslet, Aate, Winslet, null, full-time, Xellerate users, end-user, engineering, Mumbai, Software Engineer

    and now, I'm not trying to update service user attribute by changing (financial engineering) Department in a flat as file below.

    ##hRDB
    UserID, firstname, lastname, Manager, EmployeeType, Org, role, service, location, position
    AWinslet, Aate, Winslet, null, full-time, Xellerate users, the end user, finance, Mumbai, Software Engineer

    When I ran a task scheduled for the resource to flat file GTC I get below error.


    WARN, January 5, 2011 23:26:29, 354, [XELLERATE. DCM PROVIDER. RECONCILIATIONTRANSPORT], FILE ARCHIVED successfully: C:\HRFeed\staging\identities 20110105.txt
    ERROR, January 5, 2011 23:26:34, 588, [XELLERATE. SERVER], class/method: tcUSR/verifyUserLogin error: User Loginid is doubled.
    ERROR, January 5, 2011 23:26:34, 744, [XELLERATE. SERVER], class/method: tcUSR/eventPreInsert error: user login is not correct.
    ERROR, January 5, 2011 23:26:34, 760, [XELLERATE. SERVER], class/method: tcDataObj/save error: wrong to save SQL operation
    ERROR, January 5, 2011 23:26:35, 088, [XELLERATE. DATABASE], class/method: tcDataBase/rollbackTransaction some problems: Rollback performed
    java.lang.Exception: Rollback performed

    Errors, that I got to know which scheduled task to the resource of flat file GTC tries to create the new user but not to update existing user. I want to update the attributes of the user for existing users by running the flat file GTC

    Please provide your valuable contributions

    Kind regards
    Madhu

    Check the indicator "Matching" only in the management section BMS. This indicator is as a rule of reconciliation and should be checked for the primary key for example attribute emp number or the connection. Please let me know if the corresponding flag setting is correct in your environment.

  • I seem to have in dual processes that run in the Task Manager.

    In the Task Manager, I see the same process running several times.  Example: under user/Admin""(My name as) ","Local Service","Network Service"and"System"." "  These really duplicates and they slow down my system?

    Are they duplicates?  Perhaps.

    They slow down your computer?  Depends on what you're trying to do.  Anything that takes your resources take the pool available for other applications.  However, if you do not run low on resources (your CPU has a lot of horses for what is needed and you're not missing memory for most) - then it probably isn't as much of a downturn as just all of the resources actually get used.  You won't slow until that run out you of resources and try to open something else.

    If you worry about it?  N ° except if you have been compromised (you have a virus, worm, Trojan horse, malware any) and this is what is running - the system is as it should.  You are not running a single-user system - even if you are the only physical user.  Service accounts, etc. are there for the functionality of the machine as a whole.

    Windows XP...?

    I have some tips that might help you optimize this system...

    Search for malware:

    Download, install, execute, update and perform analyses complete system with the two following applications:

    Remove anything they find. Reboot when necessary. (You can uninstall one or both when finished.)

    Search online with eSet Online Scanner.

    The less you have to run all the time, most things you want to run will perform:

    Use Autoruns to understand this all starts when your computer's / when you log in. Look for whatever it is you do not know usingGoogle (or ask here.) You can hopefully figure out if there are things from when your computer does (or connect) you don't not need and then configure them (through their own built-in mechanisms is the preferred method) so they do not - start using your resources without reason.

    You can download and use Process Explorer to see exactly what is taking your time processor/CPU and memory. This can help you to identify applications that you might want to consider alternatives for and get rid of all together.

    Do a house cleaning and the dust of this hard drive:

    You can free up disk space (will also help get rid of the things that you do not use) through the following steps:

    Windows XP should take between 7 and 10 GB * with * an Office suite, editing Photo software, alternative Internet browser (s), various Internet plugins and a host of other things installed.

    If you are comfortable with the stability of your system, you can delete the uninstall of patches which has installed Windows XP...
    http://www3.TELUS.NET/dandemar/spack.htm
    (Especially of interest here - #4)
    (Variant: http://www.dougknox.com/xp/utils/xp_hotfix_backup.htm )

    You can run disk - integrated into Windows XP - cleanup to erase everything except your last restore point and yet more 'free '... files cleaning

    How to use disk cleanup
    http://support.Microsoft.com/kb/310312

    You can disable hibernation if it is enabled and you do not...

    When you Hibernate your computer, Windows saves the contents of the system memory in the hiberfil.sys file. As a result, the size of the hiberfil.sys file will always be equal to the amount of physical memory in your system. If you don't use the Hibernate feature and want to reclaim the space used by Windows for the hiberfil.sys file, perform the following steps:

    -Start the Control Panel Power Options applet (go to start, settings, Control Panel, and then click Power Options).
    -Select the Hibernate tab, uncheck "Activate the hibernation", and then click OK. Although you might think otherwise, selecting never under "Hibernate" option on the power management tab does not delete the hiberfil.sys file.
    -Windows remove the "Hibernate" option on the power management tab and delete the hiberfil.sys file.

    You can control the amount of space your system restore can use...

    1. Click Start, right click my computer and then click Properties.
    2. click on the System Restore tab.
    3. highlight one of your readers (or C: If you only) and click on the button "settings".
    4 change the percentage of disk space you want to allow... I suggest moving the slider until you have about 1 GB (1024 MB or close to that...)
    5. click on OK. Then click OK again.

    You can control the amount of space used may or may not temporary Internet files...

    Empty the temporary Internet files and reduce the size, that it stores a size between 64 MB and 128 MB...

    -Open a copy of Microsoft Internet Explorer.
    -Select TOOLS - Internet Options.
    -On the general tab in the section 'Temporary Internet files', follow these steps:
    -Click on 'Delete the Cookies' (click OK)
    -Click on "Settings" and change the "amount of disk space to use: ' something between 64 MB and 128 MB. (There may be many more now.)
    -Click OK.
    -Click on 'Delete files', then select "Delete all offline content" (the box), and then click OK. (If you had a LOT, it can take 2 to 10 minutes or more).
    -Once it's done, click OK, close Internet Explorer, open Internet Explorer.

    You can use an application that scans your system for the log files and temporary files and use it to get rid of those who:

    CCleaner (free!)
    http://www.CCleaner.com/
    (just disk cleanup - do not play with the part of the registry for the moment)

    Other ways to free up space...

    SequoiaView
    http://www.win.Tue.nl/SequoiaView/

    JDiskReport
    http://www.jgoodies.com/freeware/JDiskReport/index.html

    Those who can help you discover visually where all space is used. Then, you can determine what to do.

    After that - you want to check any physical errors and fix everything for efficient access"

    CHKDSK
    How to scan your disks for errors* will take time and a reboot.

    Defragment
    How to defragment your hard drives* will take time

    Cleaning the components of update on your Windows XP computer

    While probably not 100% necessary-, it is probably a good idea at this time to ensure that you continue to get the updates you need. This will help you ensure that your system update is ready to do it for you.

    Download and run the MSRT tool manually:
    http://www.Microsoft.com/security/malwareremove/default.mspx
    (Ignore the details and download the tool to download and save to your desktop, run it.)

    Reset.

    Download/install the latest program Windows installation (for your operating system):
    (Windows XP 32-bit: WindowsXP-KB942288-v3 - x 86 .exe )
    (Download and save it to your desktop, run it.)

    Reset.

    and...

    Download the latest version of Windows Update (x 86) agent here:
    http://go.Microsoft.com/fwlink/?LinkId=91237
    ... and save it to the root of your C:\ drive. After you register on theroot of the C:\ drive, follow these steps:

    Close all Internet Explorer Windows and other applications.

    AutoScan--> RUN and type:
    %SystemDrive%\windowsupdateagent30-x86.exe /WUFORCE
    --> Click OK.

    (If asked, select 'Run'). --> Click on NEXT--> select 'I agree' and click NEXT--> where he completed the installation, click "Finish"...

    Reset.

    Now reset your Windows with this FixIt components update (you * NOT * use the aggressive version):
    How to reset the Windows Update components?

    Reset.

    Now that your system is generally free of malicious software (assuming you have an AntiVirus application), you've cleaned the "additional applications" that could be running and picking up your precious memory and the processor, you have authorized out of valuable and makes disk space as there are no problems with the drive itself and your Windows Update components are updates and should work fine - it is only only one other thing youpouvez wish to make:

    Get and install the hardware device last drivers for your system hardware/system manufacturers support and/or download web site.

  • Permission to create/run the scheduled task

    Hello

    I'm running Windows 7 Pro RTM and I try to use my normal user account to create and run a new scheduled task, but whenever I try to save the task, I get an error msg saying "Task Scheduler cannot create the task.» Does not know the user account, the password is incorrect or the user account doesn't have permission to create this task".

    I have no problems running tasks under my admin account, but I don't want to use it for everyday purposes. I'm also sure that this error must be because of permissions problems, so can I know what is the privilege that a user must have to create/run one account task?

    Thank you very much

    Hi hifer,.

    Please use the forum for answers,

    If your account is a standard account, you will not have permission to create a task or schedule task.  Your account must be an administrator account to schedule the task for the system or it must be run as an administrator.

    It have additional permissions, you can add standard user profile to allow the profile to create the task.  But this option is not available in all versions of Windows and rather complicated.  You can try to add these groups to your profile using computer management in administrative tools.  User with power and Backup administrator can provide you with the authorization that you need if the groups are available with your version of Windows 7.

    Hope this helps,

    Kevin
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • How to force the display of user account control to run the scheduled task

    I have User Account Control setting on notify me when a program wants to make changes to my computer (the recommended setting).

    I created a scheduled task: create a restore point, using a software called Quick Restore Maker. User accounts in the program control screen comes up and stays on, ends by closes but ends the program. As I'm not at the computer when running task, I can't cancel the screen. The display ends by disappears, but the program itself does not run.

    So the question is: How can I force screen UAC a program to run without changing the UAC universal computer settings that would allow any program to change my computer without any intervention from me?

    Thanks for your help.

    There is no way around the need for approval of Admin indicated by the parameter of the UAC.

    Reduce the level of UAC would be the only thing you can try, but I understand that this would not be a safe way to proceed for normal operation.

  • Impossible to run a scheduled task of PowerCLI on Windows 7

    Hello

    I try to perform a task of scehduled on Windows 7...

    What I tried:

    AgConfigVirtual.bat

    C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe - PSConsoleFile "C:\Program Files (x 86) \VMware\Infrastructure\vSphere PowerCLI\vimaxx.psc1"-command '& {C:\VMware\AgConfigVirtual.ps1} '.

    vimaxx.psc1 (necessary to create another as the other file was giving me an error on the psmodules section, so I removed the in this new file)

    <? XML version = "1.0" encoding = "utf-8"? >

    < PSConsoleFile ConsoleSchemaVersion = "1.0" >

    < > 1.0 PSVersion < / PSVersion >

    < PSSnapIns >

    < PSSnapIn Name = "VMware.VimAutomation.License" / > "

    < PSSnapIn Name = "VMware.DeployAutomation" / > "

    < PSSnapIn Name = "VMware.ImageBuilder" / > "

    < PSSnapIn Name = "VMware.VimAutomation.Core" / > "

    < / PSSnapIns >

    < / PSConsoleFile >

    AgConfigVirtual.ps1

    $pwd = get-Content C:\VMware\powerclicred | ConvertTo-SecureString

    $cred = New - Object System.Management.Automation.PSCredential 'user', $pwd

    SE connect-VIServer-Server Server1 Server2, serveur3, server4, Server5-Credential $cred

    $ESXiServers = get-VMHost | Name sort

    $Excel01 = new-Object - ComObject Excel.Application

    $Excel01.Visible = $False

    $Workbook01 = $Excel01.Workbooks.Open("Z:\Servers\ConfigVirtual.xlsx")

    (rest of the script)...

    Ok... When I opened a cmd and run beats, it works normally... connection to all servers and then run Excel to do the rest of the script.

    When I schedule it, it just does not take into account the part of connection and opens the Excel process...

    What I am doing wrong?

    PS: The user has permissions to run as a batch process

    LucD,

    Thanks for your time and your attention =]

    I got it to work... There is a bug when opening Excel using PowerShell files scheduled tasks...

    All I had to do is create the Desktop folder on the recommended way and work for the task.

    Sources:

    Excel - Powershell script cannot access a file when it is run as a scheduled task - Stack Overflow

    https://social.technet.Microsoft.com/forums/WindowsServer/en-us/aede572b-4c1f-4729-bc9d-899fed5fad02/run-PowerShell-script-as-scheduled-task-that-uses-Excel-COM-object?Forum=winserverpowershell

    Thank you once again!

  • How to make a background service that perform a background task

    Hi all

    I am applying in which I want to start a background service that start automatically when the device restarts and do certain tasks related to the substantive application. How to do this, please explain...

    Please use the search engine before posting questions.  I put "application background" in the search box and got the following which I think will give a good start.  There are other useful matches too so research for yourself.

    http://supportforums.BlackBerry.com/T5/Java-development/create-a-background-application/Ta-p/445226

  • KB3057839 breaks the windows services that run the GUI programs

    For reasons of inheritance, one of our tracks to windows service applications a 3rd party tool which is a graphical application in general. but also has command line switches to run in batch mode. The 3rd third party provider does not (and will not) provide a lot of command line application that is stand-alone/separated from the GUI, which leaves us with no alternative at the moment.

    So far, this approach has worked on Windows 7, Windows 8, Windows 8.1, Windows Server 2008 R2, Windows Server 2012, and Windows Server 2012 R2 - regardless of the registry setting 'NoInteractiveServices' in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Windows.

    But since the installation of the KB3057839 (which relates to the MS15-061) this approach has stopped working and caused the application GUI stuck, to consume 100% of one heart. The only way to get the old behavior is the following:

    1. Change NoInteractiveServices to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Windows to the value '0' (Windows 8 and later versions; Windows 2012 and later only)
    2. Start the UI0Detect Service ("Interactive Service detection"), defining eventually it starts automatically. and according to the other settings the same set up a recurring task to restart the service (because it stops after a while).

    As soon as UI0Detect is running, the application GUI thaws and works as expected; but also long UI0Detect is running. And since the application GUI does not in fact all the message boxes or similar which require user input, this is the kind of a workaround longshot.

    Uninstallation of KB3057839 Gets the old behavior back, but I doubt that this should be the recommended way of going. And after a search, users also have many problems with this patch.

    We checked on a virtual machine that has been reset to a snapshot prior to installation (where the intended behavior is always given); installation of KB3057839 breaks, and arranges the uninstallation of KB3057839 once again.

    Is this behavior with the installation of KB3057839, or is it a bug/pervert of the fix MS15-061 effect?

    Thanks to Ståle L. Hansen

    KB3070102 (exit 14. July 2015) replaces KB3057839 and will most likely solve your problems.

    KB3070102 / MS15-073: vulnerability in the Windows kernel-mode driver could allow elevation of privileges
    https://TechNet.Microsoft.com/library/security/MS15-073
    https://support.Microsoft.com/kb/3070102

  • Best approach for a Service that runs on a queue of entry requires an asynchronous operation

    I have some sort of a queue of requests to which I am able to add news from various parts of the application.

    My JavaFX-Service must then process these requests asynchronous, but coordinated way.

    My current approach is to use an ObservableList for the queue. I have a listener on its emptyProperty and trigger restarting the service whenever it not pass of the vacuum to the vacuum.

    In the task of my service, I take the first element of the list, treat it and when the treatment has passed (or omitted), delete the list.

    Then, however I have to check in the succeeded() and failed() methods if there are more items and restart the service in the event that there are.

    It feels unnecessarily complicated and potentially error-prone. Is there not an approach more simple I'm missing?

    Oh cool, the simulation of greed, thanks for the link that James.

  • 5 Lightroom does not start but shows that run in the Task Manager?

    Hello

    I use Lightroom 5.7 (64-bit) on a Win7 machine and it worked perfectly until a few days ago. Now for reasons unknown to me, it will now not start correctly. According to the Task Manager, run, but nothing appears on the screen. It shows as a running process with about 15 020 k. If I try and interrupt the process he won't stop until I've tried 4 or 5 times.

    I tried to rename the file to preview force it to build a new file and optimize the database and he ran once, said he was checking the catalog and then came back to the same behavior.

    If I can get it started I can return to a backup of database.

    Help appreciated.

    Peter

    Thanks for the comments.

    It turns out that Lightroom is not guilty.  The hard drive containing the catalog was not, and although tests seem to show like OK it was made only reading / writing at a fraction of the correct speed. If Lightroom was very time consuming to read it's own catalog.  It tooks 48 hours to exemplary concert 1 of data off the drive.

  • Running the Scheduler tasks.

    Hello friends,

    How to find currently running tasks scheduled with query!

    --
    Kind regards
    Pradip Patel

    Select * from dba_scheduler_running_jobs;

  • Limit the software and Services that run in the Service Console in ESXi 4.0?

    How to limit the software and Services running in the Services Console in ESXi 4.0?

    Hello.

    There is no Service in ESXi Console, and it is not really a lot of apps for ESXi either. Policy and/or limited access is the best way to limit these things.

    Good luck!

  • Discoverer privileges to run a scheduled task

    Hello
    Planning a workbook, but when it's time to run, I get the error "not enough priivileges.
    Should what privielges I do?

    Thank you for your help

    Siegwin

    Hello

    It would also be the user doesn't have the required database privileges. For a user who is planning they need these privileges:

    connect
    resources
    analyze a
    Create the procedure
    create sequences
    create session
    create table
    create view
    run a procedure
    global query rewrite
    Select any table
    Unlimited tablespace
    run on sys.dbms_job
    Select on sys.v_$ parameter

    Rod West

Maybe you are looking for