scheduled-tasks

How to run a Windows 2008 task from the scheduler with “interact with desktop”

匆匆过客 提交于 2019-12-12 07:33:48
问题 I have a small .NET app that I'm running under Windows 2008 Server via the Task Scheduler. This application needs to open an excel file and then save it as csv. The task fails when I try to open the workbook. If I run it manually without the task scheduler running it, the app works fine. I have it set to "Run with highest privileges" and have "Run weather user is logged on or not" checked. My guess is that this process needs to interact with the desktop similar to check the "interact with

Proper way to schedule a task daily in C# .NET web application

主宰稳场 提交于 2019-12-12 07:27:51
问题 I have an ASP.NET MVC app that let users store media like videos and photos. The application also lets the users delete those media stored in the server. To do so i want to implement a "two steps" process in which first (when the media is selected to be deleted), the media entry at the database will get a timestamp that indicates that the entry has to be deleted in some time (a month for example); if that timestamp is not removed in that time, there should be a scheduled method that executes

Looking for a comparison of different scheduling algorithms for a Finite State Machine

此生再无相见时 提交于 2019-12-12 07:22:57
问题 Are there any good resources (books, websites) that give very good comparison of different scheduling algorithms for a Finite State Machine (FSM) in an embedded system without an OS? I am designing a simple embedded web server without an OS. I would like to know what are the various methods used to schedule the processing of the different events that occur in the system. For example,if two events arrived at the same time how are the events prioritized? If I assign different priorities to

How to make batch file start at a specific time every day?

自作多情 提交于 2019-12-12 06:44:48
问题 How do I write a batch file that starts at 2 AM every day? For example, remove and make a folder: :START rmdir /s /q "D:\share" @ping 127.0.0.1 -n 5 -w 100 mkdir "D:\share" @ping 127.0.0.1 -n 5 -w 100 回答1: You just need to create a regular batch file and then create a scheduled task. This page provides simple step-by-step instructions: http://www.computerhope.com/issues/ch000785.htm 回答2: schtasks /create /sc daily /TN AName /tr "Path-to-your-batch-file" /st 02:00 /f 来源: https://stackoverflow

Running Scheduled Tasks with Powershell

Deadly 提交于 2019-12-12 06:19:32
问题 I started coding in Powershell today and noticed that when I ran scheduled tasks via powershell, it wouldn't register as running in the Task Scheduler( Run "Taskschd.msc" ). The code I'm using is here: Get-ScheduledTask -TaskPath "\TaskPathHere\" | Start-ScheduledTask When I run a task manually( right-mouse click>Run ), the status changes from Ready to Running . This isn't the case when ran from Powershell. Question: Is there some additional parameter I need to pass to change the Status, or

asp.net mvc2 task scheduler

醉酒当歌 提交于 2019-12-12 06:09:28
问题 I have an asp.net mvc 2 app, and I need to run a task (call WS, save into db) once a day. What is the suggested way for this? One thing, I have a feeling I would like to execute this task from within the webapp. Does anyone have any suggestions: I was considering .net quartz or regular System.Timers.Timer? Does anyone see any problems? Any other better solutions? Thanks a lot --MB 回答1: Why do you want to run this from the webapp? You have no way of even knowing if the webapp will be running

WMI query in powershell script returns no object when run in a scheduled task

拟墨画扇 提交于 2019-12-12 06:05:10
问题 I have a powershell script that runs successfully. I have tested it to death. The problem comes when running it as a scheduled task. The WMI query returns no object. I have tested with the a powershell console running under the context of the account used to run the scheduled task and it runs successfully under those conditions as well. Only when running as a scheduled task does the WMI query fail. ... Function getMSMQMessageCount($queueName) { Add-content $LogFile "Querying $queueName"

Running a .bat file in Scheduled Task

六月ゝ 毕业季﹏ 提交于 2019-12-12 05:29:00
问题 I am using a Windows Server 2008 machine where I need to run a batch file as a Scheduled Task. The scheduled batch file is not running, but when I click the batch file manually its running with no problem. The Content of the batch file is as follows: cd E:\SOAPUI\soapui-2.0.2\bin e: testrunner.bat -sDev_Test -a -j -f "D:\DocRepos\LensWebSvc\SOAPUI-Reports(Lens)" "D:\DocRepos\LensWebSvc\SOAPUI\LensWebServiceTest(Lens)-soapui-project.xml" Can anyone help me to run the batch file in scheduled

Put computer in standby after running a scheduled task but only if it had to wake up to run it

泪湿孤枕 提交于 2019-12-12 05:14:33
问题 I have a scheduled task which I want to run every few hours. If the computer is currently in standby, I want it to wake up, run the task, then go back to sleep. If the computer is currently on, I want it to run the task but not go back to sleep, because that would be annoying. Is there any way of knowing whether a scheduled task had to wake the computer to run? 回答1: I've just realised one way of doing it which is to run powercfg -lastwake This is the output when waking to run a task: C:\Users