[英]Batch file and task schedule
I need to modify a job/task on different computers that I created as a task schedule. 我需要在作为任务计划创建的不同计算机上修改作业/任务。 I created a batch file to do it (please see below).
我创建了一个批处理文件(请参见下文)。 It uses that administrator account to run the job.
它使用该管理员帐户运行作业。 The task is modified, but the task doesn't run because I can't set it to run whether the user is logged on or not.
该任务已修改,但是该任务无法运行,因为无论用户是否登录,我都无法将其设置为运行。 How can I set the job to run whether the user is logged on or not?
无论用户是否登录,如何设置作业运行? I don't know how to add this code to the batch file.
我不知道如何将此代码添加到批处理文件中。 Please help.
请帮忙。
{SchTasks /Create /TN MyWeeklyReboot /TR "C:\WINDOWS\RebootMyself.vbs" /ST 13:30 /SD 12/23/2014 /SC Weekly /D TUE /ru %computername%\Administrator }
Scheduled tasks will run regardless of whether or not the user is logged on. 无论用户是否登录,计划任务都将运行。
If you add the /it option, the task will only run if the user the task runs under is logged on. 如果添加/ it选项,则仅当任务运行所在的用户登录时,任务才会运行。
Source: http://technet.microsoft.com/en-us/library/cc772785(v=ws.10).aspx/ 资料来源: http : //technet.microsoft.com/zh-cn/library/cc772785(v=ws.10).aspx/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.