如何通过命令行启动Windows Scheduler?

时间:2021-04-29 02:14:08

I mean to open the built-in Windows GUI from command line- not to launch by Schtasks

我的意思是从命令行打开内置的Windows GUI - 而不是由Schtasks启动

10 个解决方案

#1


taskschd.msc is available in Windows Vista and later.

taskschd.msc在Windows Vista及更高版本中可用。

http://technet.microsoft.com/en-us/library/cc721871.aspx

I could have sworn I'd seen a little task scheduler GUI like you're talking about prior to Vista, but maybe I was thinking of the "Add Scheduled Task" wizard.

我可以发誓我已经看到了一个像Vista之前谈论的小任务调度器GUI,但也许我正在考虑“添加预定任务”向导。

You might have to settle for opening the scheduled tasks explorer with this command:

您可能必须满足于使用此命令打开计划任务资源管理器:

control schedtasks

I couldn't find any way to launch the "Add Scheduled Task" wizard from the command line, unfortunately (there has to be a way!)

我找不到任何方法从命令行启动“添加计划任务”向导,不幸的是(必须有办法!)

#2


I'm using Windows 2003 on the server. I'm in action with "SCHTASKS.EXE"

我在服务器上使用Windows 2003。我正在使用“SCHTASKS.EXE”

    SCHTASKS /parameter [arguments]

    Description:
        Enables an administrator to create, delete, query, change, run and
        end scheduled tasks on a local or remote system. Replaces AT.exe.

    Parameter List:
        /Create         Creates a new scheduled task.

        /Delete         Deletes the scheduled task(s).

        /Query          Displays all scheduled tasks.

        /Change         Changes the properties of scheduled task.

        /Run            Runs the scheduled task immediately.

        /End            Stops the currently running scheduled task.

        /?              Displays this help message.

    Examples:
        SCHTASKS
        SCHTASKS /?
        SCHTASKS /Run /?
        SCHTASKS /End /?
        SCHTASKS /Create /?
        SCHTASKS /Delete /?
        SCHTASKS /Query  /?
        SCHTASKS /Change /?

    ┌─────────────────────────────────────┐
    │ Executed Wed 02/29/2012 10:48:36.65 │
    └─────────────────────────────────────┘

It's quite interesting and makes me feel so powerful. :)

这很有趣,让我感觉如此强大。 :)

#3


This launches the Scheduled Tasks MMC Control Panel:

这将启动计划任务MMC控制面板:

%SystemRoot%\system32\taskschd.msc /s

Older versions of windows had a splash screen for the MMC control panel and the /s switch would supress it. It's not needed but doesn't hurt either.

较旧版本的Windows有一个用于MMC控制面板的启动画面,而/ s开关会压缩它。这不是必需的,但也不会受到伤害。

#4


Yes, the GUI is available in XP. I can get the list of scheduled tasks (but not the GUI) to open with the following command,

是的,GUI在XP中可用。我可以使用以下命令获取要打开的计划任务列表(但不是GUI),

control.exe  schedtasks

Then you can use the wizard to add a new scheduled task, for example.

然后,您可以使用向导添加新的计划任务。

In XP, you can find the Scheduler GUI from within Windows Help if you search for "Scheduled Tasks" then click on "Step by Step instructions" and open the scheduler GUI. Clicking on the last link executes the following command, which likely could be translatedinto something that would open the Scheduler GUI from the command line. Does anyone know how?

在XP中,如果搜索“计划任务”,则可以在Windows帮助中找到计划程序GUI,然后单击“逐步指令”并打开计划程序GUI。单击最后一个链接将执行以下命令,该命令可能会被翻译为从命令行打开Scheduler GUI的内容。有谁知道怎么样?

ms-its:C:\WINDOWS\Help\mstask.chm::/EXEC=,control.exe, schedtasks CHM=ntshared.chm FILE=alt_url_windows_component.htm

#5


Here is an example I just used:

这是我刚才使用的一个例子:

at 8am /EVERY:M,T,W,Th,F,S,Su cmd /c c:\myapp.exe

The result was:

结果是:

Added a new job with job ID = 1

Then, to check my work:

然后,检查我的工作:

at

#6


You can make a new shortcut to:

您可以创建一个新的快捷方式:

control schedtasks

Name it something easy like "tsks.lnk" and then save it in c:\windows\system32.

将其命名为“tsks.lnk”,然后将其保存在c:\ windows \ system32中。

You can now press Windows Key + R, then type "tsks" and press Enter and voila. No mouse necessary at that point.
Or in Windows Vista/7/2008, just press Windows Key, then type "tsks" and press Enter.

您现在可以按Windows键+ R,然后键入“tsks”并按Enter键瞧。那时没有必要的老鼠。或者在Windows Vista / 7/2008中,只需按Windows键,然后键入“tsks”并按Enter键。

#7


You might want to have look at simple command line scheduler "at":

您可能希望查看简单的命令行调度程序“at”:


C:\Documents and Settings\mahendra.patil>at/?

The AT command schedules commands and programs to run on a computer at a specified time and date. The Schedule service must be running to use the AT command.

AT命令安排命令和程序在指定的时间和日期在计算机上运行。必须运行Schedule服务才能使用AT命令。

AT [\\computername] [ [id] [/DELETE] | /DELETE [/YES]]
AT [\\computername] time [/INTERACTIVE]
    [ /EVERY:date[,...] | /NEXT:date[,...]] "command"

\computername Specifies a remote computer. Commands are scheduled on the local computer if this parameter is omitted.

\ computername指定远程计算机。如果省略此参数,则在本地计算机上调度命令。

id Is an identification number assigned to a scheduled command.

id是分配给已调度命令的标识号。

/delete Cancels a scheduled command. If id is omitted, all the scheduled commands on the computer are canceled.

/ delete取消已调度的命令。如果省略id,则取消计算机上的所有计划命令。

/yes Used with cancel all jobs command when no further confirmation is desired.

/ yes当不需要进一步确认时,与cancel all jobs命令一起使用。

time Specifies the time when command is to run.

time指定命令运行的时间。

/interactive Allows the job to interact with the desktop of the user who is logged on at the time the job runs.

/ interactive允许作业与作业运行时登录的用户的桌面进行交互。

/every:date[,...] Runs the command on each specified day(s) of the week or month. If date is omitted, the current day of the month is assumed.

/ every:date [,...]在每周或每月的指定日期运行命令。如果省略日期,则假定当月的当天。

/next:date[,...] Runs the specified command on the next occurrence of the day (for example, next Thursday). If date is omitted, the current day of the month is assumed.

/ next:date [,...]在当天下一次出现时运行指定的命令(例如,下周四)。如果省略日期,则假定当月的当天。

"command" Is the Windows NT command, or batch program to be run.

“command”是要运行的Windows NT命令还是批处理程序。

#8


You can use either TASKSCHD.MSC or CONTROL SCHEDTASKS

您可以使用TASKSCHD.MSC或CONTROL SCHEDTASKS

Here are some more such commands.

这里有一些更多这样的命令。

#9


I'm also running XP SP2, and this works perfectly (from the command line...):

我也运行XP SP2,这完全可以工作(从命令行...):

start control schedtasks

#10


If you’re asking what I think you’re asking, you can open it by executing this:

如果你问我认为你在问什么,可以通过执行以下命令打开它:

explorer.exe "C:\WINDOWS\Tasks\"

#1


taskschd.msc is available in Windows Vista and later.

taskschd.msc在Windows Vista及更高版本中可用。

http://technet.microsoft.com/en-us/library/cc721871.aspx

I could have sworn I'd seen a little task scheduler GUI like you're talking about prior to Vista, but maybe I was thinking of the "Add Scheduled Task" wizard.

我可以发誓我已经看到了一个像Vista之前谈论的小任务调度器GUI,但也许我正在考虑“添加预定任务”向导。

You might have to settle for opening the scheduled tasks explorer with this command:

您可能必须满足于使用此命令打开计划任务资源管理器:

control schedtasks

I couldn't find any way to launch the "Add Scheduled Task" wizard from the command line, unfortunately (there has to be a way!)

我找不到任何方法从命令行启动“添加计划任务”向导,不幸的是(必须有办法!)

#2


I'm using Windows 2003 on the server. I'm in action with "SCHTASKS.EXE"

我在服务器上使用Windows 2003。我正在使用“SCHTASKS.EXE”

    SCHTASKS /parameter [arguments]

    Description:
        Enables an administrator to create, delete, query, change, run and
        end scheduled tasks on a local or remote system. Replaces AT.exe.

    Parameter List:
        /Create         Creates a new scheduled task.

        /Delete         Deletes the scheduled task(s).

        /Query          Displays all scheduled tasks.

        /Change         Changes the properties of scheduled task.

        /Run            Runs the scheduled task immediately.

        /End            Stops the currently running scheduled task.

        /?              Displays this help message.

    Examples:
        SCHTASKS
        SCHTASKS /?
        SCHTASKS /Run /?
        SCHTASKS /End /?
        SCHTASKS /Create /?
        SCHTASKS /Delete /?
        SCHTASKS /Query  /?
        SCHTASKS /Change /?

    ┌─────────────────────────────────────┐
    │ Executed Wed 02/29/2012 10:48:36.65 │
    └─────────────────────────────────────┘

It's quite interesting and makes me feel so powerful. :)

这很有趣,让我感觉如此强大。 :)

#3


This launches the Scheduled Tasks MMC Control Panel:

这将启动计划任务MMC控制面板:

%SystemRoot%\system32\taskschd.msc /s

Older versions of windows had a splash screen for the MMC control panel and the /s switch would supress it. It's not needed but doesn't hurt either.

较旧版本的Windows有一个用于MMC控制面板的启动画面,而/ s开关会压缩它。这不是必需的,但也不会受到伤害。

#4


Yes, the GUI is available in XP. I can get the list of scheduled tasks (but not the GUI) to open with the following command,

是的,GUI在XP中可用。我可以使用以下命令获取要打开的计划任务列表(但不是GUI),

control.exe  schedtasks

Then you can use the wizard to add a new scheduled task, for example.

然后,您可以使用向导添加新的计划任务。

In XP, you can find the Scheduler GUI from within Windows Help if you search for "Scheduled Tasks" then click on "Step by Step instructions" and open the scheduler GUI. Clicking on the last link executes the following command, which likely could be translatedinto something that would open the Scheduler GUI from the command line. Does anyone know how?

在XP中,如果搜索“计划任务”,则可以在Windows帮助中找到计划程序GUI,然后单击“逐步指令”并打开计划程序GUI。单击最后一个链接将执行以下命令,该命令可能会被翻译为从命令行打开Scheduler GUI的内容。有谁知道怎么样?

ms-its:C:\WINDOWS\Help\mstask.chm::/EXEC=,control.exe, schedtasks CHM=ntshared.chm FILE=alt_url_windows_component.htm

#5


Here is an example I just used:

这是我刚才使用的一个例子:

at 8am /EVERY:M,T,W,Th,F,S,Su cmd /c c:\myapp.exe

The result was:

结果是:

Added a new job with job ID = 1

Then, to check my work:

然后,检查我的工作:

at

#6


You can make a new shortcut to:

您可以创建一个新的快捷方式:

control schedtasks

Name it something easy like "tsks.lnk" and then save it in c:\windows\system32.

将其命名为“tsks.lnk”,然后将其保存在c:\ windows \ system32中。

You can now press Windows Key + R, then type "tsks" and press Enter and voila. No mouse necessary at that point.
Or in Windows Vista/7/2008, just press Windows Key, then type "tsks" and press Enter.

您现在可以按Windows键+ R,然后键入“tsks”并按Enter键瞧。那时没有必要的老鼠。或者在Windows Vista / 7/2008中,只需按Windows键,然后键入“tsks”并按Enter键。

#7


You might want to have look at simple command line scheduler "at":

您可能希望查看简单的命令行调度程序“at”:


C:\Documents and Settings\mahendra.patil>at/?

The AT command schedules commands and programs to run on a computer at a specified time and date. The Schedule service must be running to use the AT command.

AT命令安排命令和程序在指定的时间和日期在计算机上运行。必须运行Schedule服务才能使用AT命令。

AT [\\computername] [ [id] [/DELETE] | /DELETE [/YES]]
AT [\\computername] time [/INTERACTIVE]
    [ /EVERY:date[,...] | /NEXT:date[,...]] "command"

\computername Specifies a remote computer. Commands are scheduled on the local computer if this parameter is omitted.

\ computername指定远程计算机。如果省略此参数,则在本地计算机上调度命令。

id Is an identification number assigned to a scheduled command.

id是分配给已调度命令的标识号。

/delete Cancels a scheduled command. If id is omitted, all the scheduled commands on the computer are canceled.

/ delete取消已调度的命令。如果省略id,则取消计算机上的所有计划命令。

/yes Used with cancel all jobs command when no further confirmation is desired.

/ yes当不需要进一步确认时,与cancel all jobs命令一起使用。

time Specifies the time when command is to run.

time指定命令运行的时间。

/interactive Allows the job to interact with the desktop of the user who is logged on at the time the job runs.

/ interactive允许作业与作业运行时登录的用户的桌面进行交互。

/every:date[,...] Runs the command on each specified day(s) of the week or month. If date is omitted, the current day of the month is assumed.

/ every:date [,...]在每周或每月的指定日期运行命令。如果省略日期,则假定当月的当天。

/next:date[,...] Runs the specified command on the next occurrence of the day (for example, next Thursday). If date is omitted, the current day of the month is assumed.

/ next:date [,...]在当天下一次出现时运行指定的命令(例如,下周四)。如果省略日期,则假定当月的当天。

"command" Is the Windows NT command, or batch program to be run.

“command”是要运行的Windows NT命令还是批处理程序。

#8


You can use either TASKSCHD.MSC or CONTROL SCHEDTASKS

您可以使用TASKSCHD.MSC或CONTROL SCHEDTASKS

Here are some more such commands.

这里有一些更多这样的命令。

#9


I'm also running XP SP2, and this works perfectly (from the command line...):

我也运行XP SP2,这完全可以工作(从命令行...):

start control schedtasks

#10


If you’re asking what I think you’re asking, you can open it by executing this:

如果你问我认为你在问什么,可以通过执行以下命令打开它:

explorer.exe "C:\WINDOWS\Tasks\"