Windows Task Scheduler - Run only during window of time

时光怂恿深爱的人放手 提交于 2019-12-31 17:49:38

问题


I have a task already set up in the Windows Scheduler (on Win Server 2008). It works great but it can put a burden on the system during peak hours (when the box is being used for other things). I currently run the job every 15 minutes. Can Task Sch. be setup to run every 15 minutes but only during a certain window of time. So I could set it up to run every 15 min, but only from 5pm to 5am -- and not run at all from 5am to 5pm?


回答1:


Set a daily schedule starting at 5pm. In the Advanced dialog, click Repeat task, then specify Every=15 minutes, Until:Time=5am.

Edit: The above instructions are for Windows 2003 Server or XP. If Windows Server 2008 is like Windows 7, then you can do the same thing through the Triggers tab. Set a daily trigger, Start=5pm, Repeat Task Every=15 minutes, For a duration of=12 hours. You don't need to stick with the pre-defined times - you can type into these fields any value you wish.




回答2:


For Windows 2008 & above this is what I did:

  1. Create task
  2. Triggers tab
  3. New ...
  4. Use the following settings

In this particular example I want to run the task from 12:06 AM to 23:50 PM.

In "for a duration of" I entered the amount of minutes I want it to run for. Actually you could also enter some thing like 23:50:00 in the "for a duration of" field. It will automatically convert it to minutes after you click OK. That was my experience.




回答3:


In the triggers tab you can add multiple triggers by using the "New" button. See screenshot below.




回答4:


You have to set on the the Start field: 5:00:00 AM and on 'for duration of' you have to write '12 hours' or '12:00:00'



来源:https://stackoverflow.com/questions/4390617/windows-task-scheduler-run-only-during-window-of-time

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!