Windows 7 Scheduled task command line

后端 未结 2 1204
野的像风
野的像风 2021-01-01 02:17

This command should create a task that every minute runs the calculator windows application.

schtasks /Create /tn \"mytask\" /sc MINUTE /mo 1  /ru \"myuser\"         


        
2条回答
  •  爱一瞬间的悲伤
    2021-01-01 03:14

    Probably because the task isn't running interactively. Add the '/it' option:

    /IT
    A value that enables the task to run interactively only if the /RU user is currently logged on at the time the task runs. The task runs only if the user is logged on.

    Without the /it option, tasks run in session 0, which doesn't allow interaction with the user. For more information, do a web search for "Session 0 isolation".

提交回复
热议问题