Windows Services vs Task Scheduler

We have a number of desktop apps written by a staff member who has left. These sit on the desktop and all of them poll a directory and process files in certain ways.
Obviously, this is inefficient and I want to rewrite them.
What would be best in this scenario? Windows Services or Task Scheduler?
Collins

Unfortunately your post is off topic here, in the TechNet Site Feedback forum, because it is not Feedback about the TechNet Website or Subscription. 
This is only one forum among the many that are on the TechNet Discussion Forums, and given your post, you likely chose the wrong forum. 
This is a standard response I’ve written up in advance to help many people (thousands, really.) who post their question in this forum in error, but please don’t ignore it. 
The links I share below I’ve collected to help you get right where you need to go with your issue.
For technical issues with Microsoft products that you would run into as an
end user of those products, one great source of info and help is
http://answers.microsoft.com, which has sections for Windows, Hotmail, Office, IE, and other products. Office related forums
are also here: http://office.microsoft.com/en-us/support/contact-us-FX103894077.aspx
For Technical issues with Microsoft products that you might have as an
IT professional (like technical installation issues, or other IT issues), you should head to the TechNet Discussion forums at
http://social.technet.microsoft.com/forums/en-us, and search for your product name.
For issues with products you might have as a Developer (like how to talk to APIs, what version of software do what, or other developer issues), you should head to the
MSDN discussion forums at http://social.msdn.microsoft.com/forums/en-us, and search for your product or issue.
If you’re asking a question particularly about one of the Microsoft Dynamics products, a great place to start is here:
http://community.dynamics.com/
If you really think your issue is related to the subscription or the TechNet Website, and I screwed up, I apologize! 
Please repost your question to the discussion forum and include much more detail about your problem, that could include screenshots of the issue (do not include subscription information or product keys in your screenshots!), and/or links to the problem
you’re seeing. 
If you really had no idea where to post this question but you still posted it here, you still shouldn’t have because we have a forum just for you! 
It’s called the Where is the forum for…? forum and it’s here: http://social.msdn.microsoft.com/forums/en-us/whatforum/
Moving to off topic. 
Thanks
MSDN and TechNet Subscriptions Support
Did Microsoft call you out of the blue about your computer?
No, they didn't.

Similar Messages

  • Windows 7 professional task scheduler

    I have problem with task scheduler with 4 computers whic are in windows domain - server 2008.
    In total there are 7 computers on 3 computers task scheduler runs batch file and all works ok, but on other 3 i have the same settings, task is not runned.I can run it in task cheduler with right click on task and run it, but itself doesn't run. But runs
    on other 3 computers which are all the same and all windows 7 professional
    All pcs runs the same batch file which is on shared folder on server.
    I have runned it with folloved users: system, administrator, users, etc.
    Batch file must be runned when system starts, when user login and at selected time.
    What can be wrong?
    I never left an open problem....I search, dig and ask, until it's solved....

    Hi Blisk1,
    Thank you for your update.
    I would like to suggest you refer to the link below to check the issue (although it applies to Windows xp):
    HOW TO Troubleshoot Scheduled Tasks in Windows XP:
    http://support.microsoft.com/default.aspx?scid=kb;en-us;308558
    As I know, if the service is not configured to log on as the local system account, it may not start.
    To check the settings for the service:
    1. Click Start, click Control Panel, and then double-click Administrative Tools.
    2. Click Computer Management.
    3. Expand Services and Applications, and then click Services.
    4. Right-click the Task Scheduler service, and then click Properties.
    5. On the General tab, make sure that the startup type is set to automatic, and that the service status is Started. If the
     service is not running, click Start.
    6. On the Log On tab, make sure that the local system account is selected, and that the Allow service to interact with desktop
    check box has a check mark.
    7. Click OK, and then quit Computer Management.
    Hope it helps.
    Regards,
    Blair Deng
    Blair Deng
    TechNet Community Support

  • Workflow does not start when PowerShell Script is run from Task Scheduler

    I have a PS script that updates an item in a SP2010 list so that a workflow will be started.  When I run the PS script manually from the PS window on the server it resides, the script runs flawlessly.  If I set a scheduled task on the same server
    to run the script with the same credentials as are being used in the PS window, the script runs, updated the info on the list, but DOES NOT start the workflow.  As we know, SPD workflows cannot be started by anonymous or system accounts.  It is as
    if the task scheduler adds a bit of information that makes the SP2010 list think the information was updated by one of these accounts even though the field in the list for the item being updated shows the correct account.
    HELP!!!
    D

    Hi,
    The issue might be related to the script or schedule task settings your configured. You’d better check the settings.
    For example, which option do you set to run the scheduled task? You may select “Run whether user is logged on or not” instead of “run only when user is logged on” as shown in this article:
    http://blog.pointbeyond.com/2010/04/23/run-powershell-script-using-windows-server-2008-task-scheduler/
    Hope it helps.
    Best Regards,
    Sally Tang

  • Task scheduler service fails to run after windows update

    OS: W2008R2x64
    We noticed that our daily tasks are not running anymore since the last windows updates few days ago. When running the task scheduler mmc, we get the following:
    Looking further, the service did not seems to be running. If we try to start the service we get the follow message:
    "The Task Scheduler service on Local Computer started and then stopped. Some services stop automatically if they are not in use by other services or programs."
    Now we noticed that did problem started after following updates, though not all machines are infected!!:
    Cumulative Security Update for Internet Explorer 9 for Windows Server 2008 R2 x64 Edition (KB2925418)
    Security Update for Windows Server 2008 R2 x64 Edition (KB2930275)
    Windows Malicious Software Removal Tool x64 - March 2014 (KB890830)
    Update for Windows Server 2008 R2 x64 Edition (KB2929733)

    Hi,
    Here is a similar thread for your reference, please go through it and troubleshoot the issue:
    http://answers.microsoft.com/en-us/windows/forum/windows_7-performance/task-scheduler-wont-start/11394a52-d7de-496b-880b-733123579b9b
    Regards,
    Yan Li
    Regards, Yan Li

  • 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.

  • Require script or a method to Run .exe files on target computers using task scheduler or any other Windows server intigrated tool

    Hi All,
    We are outsourcing services to our clients. One of our clients whom we manage the whole Active directory / Exchange 2010 infrastructure have a requirement.
    We would like to run a .exe file from one server to another server / servers remotely to generate a report. The challenge is that we do not have permissions on some servers to access so we cannot login manually and run the .exe file to generate that report.
    (All are in the same domain restricted or non restricted)
    The domain Administrator (Client) Has restricted us to login to those servers due to security reasons. And is not providing us permissions or not giving the username and password to login to those servers.
    Requirement is :
    To run a .exe file with some parameters in it on the restricted servers Via powershell script or task scheduler (As the task will be created by the domain admin in the server in which we have access by entering the domain account).
    As we have to run this .exe file on around 60 servers (restricted) so an option should popup asking the name of the agent in which you want to RUN the .exe file or a source input via CSV will also be fine.
    Can anyone tell me or can this be possible ? Is there any one who has made such a script.
    Can anyone please help.
    Gautam.75801

    Hi Justin,
    Thank you for the suggestion.
    Below is the script what i Executed.
    "C:\Windows\system32\PsExec.exe" @C:\HPS\Serverrlist.txt cmd /C "server name\C$\hps\hps.EXE"
    Pause
    I tried using PSExec. But in the LAB domain as well as in the production i tried this on servers in which i have full access. When i execute this i get the output as Access is denied. Below is the screenshot of the Error.
    I have installed Psexec on both machines.
    I have full admin rights to the shared folder or network location which i have scratched in the screenshot. Not sure why i am getting this error.
    Also analysed the event logs and found a failure event once i execute this script.
    A handle to an object was requested.
    Subject:
    Security ID:
    Domain name\My username
    Account Name:
    Lg167978
    Account Domain:
    My Domain
    Logon ID:
    0x234992
    Object:
    Object Server:
    Security
    Object Type:
    File
    Object Name:
    C:\Windows\System32\eventvwr.msc
    Handle ID:
    0x0
    Process Information:
    Process ID:
    0x17e0
    Process Name:
    C:\Windows\System32\mmc.exe
    Access Request Information:
    Transaction ID:
    {00000000-0000-0000-0000-000000000000}
    Accesses:
    READ_CONTROL
    SYNCHRONIZE
    WriteData (or AddFile)
    AppendData (or AddSubdirectory or CreatePipeInstance)
    WriteEA
    ReadAttributes
    WriteAttributes
    Access Reasons:
    READ_CONTROL: Granted by
    D:(A;;0x1200a9;;;BA)
    SYNCHRONIZE:
    Granted by D:(A;;0x1200a9;;;BA)
    WriteData (or AddFile):
    Not granted
    AppendData (or AddSubdirectory or CreatePipeInstance):
    Not granted
    WriteEA:
    Not granted
    ReadAttributes:
    Granted by ACE on parent folder D:(A;;0x1301bf;;;BA)
    WriteAttributes:
    Not granted
    Access Mask:
    0x120196
    Privileges Used for Access Check:
    Restricted SID Count:
    0
    Can you help in solving this.
    Gautam.75801

  • Windows Server 2008 sp2 Task Scheduler missing next run time after restart

    Hi,
    I have the issue that there does not appear to be a fix for with a server 2008 sp2 (NOT R2) where after a restart all tasks are missing the next run time so I need to edit each task to add this time back in. I have tried  the hotfix in KB 950035
    but this when you run it is only for Vista and cannot be installed despite saying it's also for Server 2008.
    For some reason also this is Task Scheduler version 1 not 2 which I thought came with windows since Vista so SP2 should have it.
    Anyone got any ideas?
    Thanks,

    Hi Evans,
    Would you please let us know current situation of this issue?
    As Dave mentioned, Windows Server 2008 Service Pack 2 include all the previously released updates for Windows
    Server 2008.
    Based on your description, I understand that all scheduled tasks still miss the next run time on your Windows
    Server SP2 when the server restart. If anything I misunderstand, please don’t hesitate to let me know.
    On current situation, please open Properties of one problematic scheduled task, navigate to History tab, then
    check if find some relevant events or errors. Those may help us to go further analyze.
    If any update, please feel free to let us know.
    Hope this helps.
    Best regards,
    Justin Gu
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Windows 2008 R2 server Scheduled Task not working

    I have a batch file that writes to a file, when I click it manually it works. However when I have it set in a scheduled task it will create the file but it will not write to the file.
    How can I fix this?

    Hi,
    1.   
    Please try to make sure the
    Task Scheduler: Service is running.
    For details: run 'services.msc', Scroll down to the 'Task Scheduler' service, Check the 'Startup Type' column, The 'Startup Type' should be set to "Automatic",
    Check the 'Status' column.
    If the service is started, it will list 'Started' in the 'Status' column.
    2.   
    Please try to make sure Group Policy preventing the user to run the task.
    3.   
    Please try to make sure UAC has been disabled.
    4.   
    Please try to enabled the
    policy Inclusion list for moderate risk file types, and fill ‘.bat’ in the blank.
    For details:
    User Configuration -> Administrator Templates -> Windows Components -> Attachment Manager
    In addition, please try to refer
    this to troubleshoot.
    If the issue persist, please try to collect more information for further analyze:
    Event log
    ==============
    1. Click "Start", click “Run”, input "eventvwr" and press Enter.
    2. Expand the "Windows Logs" node on the left pane, right-click on "System" and click "Save All Events As"; in the pop-up window, click to choose the Desktop icon
    on the left frame, input "sys" in the "File name" blank, and then click save.
    3. Expand the “Applications and Services Logs”. Click the arrow next to Microsoft, and then Windows, and then TaskScheduler. Click Operational. Click
    "Save All Events As"; in the pop-up window, click to choose the Desktop icon on the left frame, input "policy" in the "File name" blank, and then click save.
    4. Locate the two saved log files on the Desktop and send them to us.
    GPMC.log
    ==================
    a.   
    On domain controller, click Start -> Run, type GPMC.MSC, it will load the GPMC console.
    b.   
    Right click on "Group Policy Result" and choose wizard to generate a report for the problematic computer and user account (please place appropriately). (Choose computer and select the proper user in the wizard)
    c.   
    Right click  the resulting group policy result and click the "Save Report…" => save report to save the report to a HTML file and send it to me.
    please contact me with my account:
    [email protected] to get a workspace to upload the information.
    Hope this helps!

  • Windows 2008 R2 - Poor performance of Task Scheduler with script

    Hello,
    I have some reports to make (using macro on an access database) every day. When I launch the command line on interactive mode (cmd windows) the process msaccess use 20% of processing and Excel use 2%. All working fine.
    When I launch from the Task Scheduled, msaccess and excel use 0%. Command line and the account are the same.
    I try to change the priority to realtime -> same result
    I try to use a psexec -i (for interactive mode) -> same result
    I put the account to the service group (log on as a service) -> same result (Processor scheduling adjusted for Background Services)
    Any idea ?
    Thx for your help

    You should be able to use CreatObject method of VBScript. I'd ask them over here.
    Visual Basic for Applications forum on MSDN
    Office Access forums on Microsoft Answers
    Also
    How to use command-line switches in Microsoft Access
    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]
    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

  • Do I need IIS or Task Scheduler for a windows install of the SOA suite

    I am currently trying to set a R&D SOA environment up on a windows box. By default these services are disabled when we usually set up our application servers within dev. So do I need IIS and task scheduler to be running on the windows environment when I install the SOA suite?

    Hi,
    you do not need the IIS because SOA Suite is shipped with its own Apache.

  • Unable to receive an email by task scheduler on audit failure in windows server 2008 r2 security log

    Deal All,
    I am sorry in advance if i would be on wrong forum, i have created a task on Server 2008 r2 Domain controller that when an audit failure event triggered in windows security log then an email should reach on my email ID, but unfortunately, nothing happen
    on audit failure.i receive no email from task scheduler.
    kindly suggest me to resolve the issue. I have created Email task on  event ID 4771.
    Thanks.
    Zeeshan Ibrahim Network Administrator

    Hi Zeeshan,
    I have found a hotfix against the same error messages, though it applies to Windows Vista and Windows Server 2008, I am not sure if it will work on your machine.
    Please refer to this KB article below:
    Duplicate triggers are generated incorrectly in scheduled tasks in Windows Vista or in Windows Server 2008
    http://support.microsoft.com/kb/2617046
    Please feel free to let us know if this hotfix couldn’t help you fix this issue.
    Best Regards,
    Amy Wang

  • Running a .cmd file at startup using Task Scheduler on Windows 2012 R2 server

    Hello,
    I've recently tried to get a simple .cmd file running at server startup on my Windows 2012 R2 server.
    The .cmd (test.cmd) file contains the following:
    C:
    cd C:\SomeFolder\
    call Some.exe file "Argument1" "Argument2"
    I've ensured that the local administrator user [someuser01] has full control of the C:\SomeFolder
    I've also ensured that someuser01 is part of Log on as Batch Job
    in Local Security Policy
    To try running it as startup, I tried using Task Scheduler.
    General Tab: I set the user (local administrator account [someuser01] ) and ticked the options
    Run whether logged on or not, Do not Store Password, Run with Highest Privileges
    Triggers: At System Startup, Ticked Enabled
    Actions: Start a Program. Program/Script: test.cmd, Add arguments: [Blank], Start in: C:\SomeFolder
    Conditions: Unticked all conditions
    Settings: Ticked only the following --> Allow task to be run on demand, If the running task does not end...force to stop
    Then I clicked OK and was prompted for someuser01's credentials.
    I then restarted the server.
    Upon logging in as administrator, I checked the task scheduler, and I found that the task did not run (Last Run Time: Never)
    I've been able to run it manually (click Run on the task in Task scheduler) without any problems.
    I just cannot get it to run at startup as I've instructed Task Scheduler to do.
    Any ideas on what might be causing this problem?
    Thanks.

    Hello Dave Patrick,
    I've also tried this approach and I came across this error after I try to enter someuser01's credentials:
    An error has occured for the task sometask01. Error message: The following error was reported: A specified logon session does not exist. It may already have been terminated..
    After doing some research, this new error is caused by a setting in Local Security:
    Local Security Policy --> Security Options --> Network Access: Do not allow storage of passwords and credentials for network authentication --> Enabled
    Unfortunately, I cannot disable this Security Policy due to our company's internal restrictions.
    Just to clarify, the reason that the task does not run at startup is because of a logon failure because the password was not stored for
    someuser01 ?
    However, I cannot allow storage of the password because of our our company's internal restrictions.
    Is there a possible workaround for this..?
    Thanks!

  • Windows task scheduler to run batch file running a java program

    I have created a batch file that runs my SendEmail program. The batch file is in the same directory as the java program. The only line in the batch file is
    java SendEmail
    This works fine from the command prompt but from the windows task scheduler it fails to function. Any help on how I can overcome this problem will be greatly appreciated.
    THanks

    Looks okay. The classpath is set, too, I guess? Btw, try running javaw instead of java. I may err, but I think it can show a console, so you can watch any error messages.

  • Windows Task Scheduler executing old triggers even after recreating the task

    I had this task working perfectly until I changed the schedule. After I changed the scheduled time 5 minutes earlier, I noticed that in the history, it still triggers the old schedule. I tried restarting the server, deleting the task and recreating it even
    without a trigger and it's still executing the task with the old trigger. The attached screenshot shows that the task doesn't have a trigger but as you can see in the history it's still trying to execute the task. How does the Windows Task Scheduler work?
    Is there a file or database that I can purge the old task?
    I also tried applying this hotfix but it didn't seem to fix the issue: 
    http://support.microsoft.com/kb/2461249
    NOTE: This is Windows 2008 R2 and the Error message in the history is: Task Scheduler failed to start "<the
    name of my task>" task for user "<the
    user>". Additional Data: Error Value: 2147750689.

    Since batch job can be run manually without error, cmd.exe is not the problem.
    I researched and found that the problem may be due to exhausted desktop heap and the solution is to increase the value.
    Please try this step:
    1. restart the server first and test again (a simple solution that may work)
    2. if the first attempt fail, take a full backup first and attempt to increase desktop heap
         http://www.symantec.com/business/support/index?page=content&id=TECH48099
    Yes THAT WAS THE SOLUTION FOR THE ISSUE. !!
    Now its working perfect!!
    Why now its working and not before? Because after made the changes to the registry,
    RESTART IS NECESSARY to apply the changes and I have done it yesterday night (this server is working 24x7, so its hard to find a moment to restart it). 
    Thanks for all to help me with this issue!!! I really,really ,really ,really  apreciate !!! 
    THANKS !!!!!

  • Windows Update tasks in Task Scheduler (Windows 8.1)

    In the Task Scheduler under Windows Update there are a few tasks :
    AUFFirmwareinstall
    AUScheduledinstall
    AUSessionConnect
    Scheduled Start
    Scheduled Start with Network
    The status of the 1st , 2nd and 3rd is as unable.
    With the next 2 there are following problems : the result after run is :
    Scheduled Start : (0x420) and Scheduled Start with Network : ok (0x0) or 1st is ok and 2nd 0x420
    Would appreciate an advice or comments how to make them work properly.
    Best regards, EwaGosia

    Hi Yolanda,
    Thank you very much for your attention and reply. At status of  the tasks under Windows Update after 1st planned run /today in the morning/ has looked as follows :
    AUFFirmwareinstall, AUScheduledinstall and AUSessionConnect as disabled and
    Scheduled Start : (0x420) and Scheduled Start with Network : ok (0x0).
    Have noticed that at app. the same time Scheduled Start with Network run in the Control Panel - Windows Update there is information about the last research with no result/no updates found , so it seems it is working.
    After this this both tasks were planned to start next 2nd time later today and the result for both is now:
    Scheduled Start : (0x420) and Scheduled Start with Network :  (0x420).
    The next start has been planned for tomorrow morning (it is made by the system in the Task scheduler and I can not change).
    Will look if the system can install automatically the updates when find as till now I made it simply from Windows Update in control Panel to click "install". My laptop is quite new and would like to check if the system can fix automatic installation
    of next Windows 8.1 Updates.
    Would appreciate if you still have some comments.
    Thanks and best regards, Ewa

Maybe you are looking for

  • Dell soundcard does not work, need upgrade?

    I purchased a Dell Intel core duo processor E4500 (2 MB L2 cache, 2.20 Ghz, 2 Gb SD Ram, Windows Vista) earlier this year. After I installed Audition 3.0 I received a message that read: Have direct sound Card Driver selected, for best results select

  • I cannot log into my account to create a pdf from a word file. keeps telling me error.

    I paid for the service and have yet be able to use it. Keeps telling me error.

  • Lenovo E540 - Dual External Monitors

    Hi, This question is about the Lenovo E540 laptop (with HD Graphics 4600 or 4400). 1.I would like to know if its possible to connect two external monitors to the laptop (using hdmi and vga ports together) - resulting in 3 active screens (laptop scree

  • Missing playlist music

    Last night I opened iTunes to listen to music. I clicked on a playlist to discover that all my ordinary playlists are empty (the smart playlists are fine). The music shows up in the main "music" section, however, it will takes hours (if not days) of

  • Calculate freight cost in sales document

    hi i want to calculate freight cost in a sales order . ex = 0.1 of total weight . is it possible ? i try to do this with a fms : SELECT $[ORDR.Weight]*0.1 in the field "amount" of "freight charges" ( form 3007 ) with auto refresh , on field change "w