简体   繁体   English

在Windows Server 2008中创建计划任务

[英]Creating a Scheduled Task in Windows Server 2008

I'm used to using Windows Server 2003 and to run my Python scripts as a scheduled task I simply followed the below steps: Opened Scheduled Tasks > Add Scheduled Task > Next > select Python > Next > Name the task, daily > supplied start time > supplied username and password to run the task. 我习惯于使用Windows Server 2003并将Python脚本作为计划任务运行,我只需遵循以下步骤:打开计划任务>添加计划任务>下一步>选择Python >下一步>为任务命名,每天>提供的开始时间>提供了用于运行任务的用户名和密码。

Server 2008 looks a bit different but after opening Task Scheduler, I first chose Create basic task > gave it a name > chose Daily > start time and date > start program > and this is where I get confused.. I'm now asked to browse for Program/script (which i thought would be my actual python script) and I can Add arguments and Start in (both are optional). Server 2008看起来有点不同,但是在打开Task Scheduler之后,我首先选择Create basic task>为其命名,然后选择Daily> Start time and date> start program>,这是我感到困惑的地方。浏览程序/脚本(我认为这将是我实际的python脚本),然后我可以添加参数和Start in(两者都是可选的)。 How do I tell the Task Scheduler that the program is a Python program? 如何告诉任务计划程序该程序是Python程序? Server 2003 gave me a list for that. Server 2003为我提供了一个清单。 If I setup the Task the way I just described and run it, my task simply opens in Notepad and never runs. 如果我按照刚才描述的方式设置并运行任务,那么我的任务只会在记事本中打开,并且永远不会运行。

Thank you for any help. 感谢您的任何帮助。

您可以将python.exe设置为程序,然后将脚本作为参数传递给它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM