简体   繁体   English

任务调度器+python+bat文件

[英]Task scheduler +python + bat file

I am trying to schedule a task in task scheduler I have created a batch file as below我正在尝试在任务计划程序中安排任务我已经创建了一个批处理文件,如下所示

"C:\ProgramData\Anaconda3\python.exe" 
"C:\helloo\mail.py" 
 pause

the above is the content of my batch file.以上是我的批处理文件的内容。 When i run the batch file i can able to get the output.当我运行批处理文件时,我可以获得 output。 i am not facing any issue with the code which i am executing.我正在执行的代码没有任何问题。 But with task schedular i am following the below steps但是对于任务计划,我遵循以下步骤

1.open task schedular 
2.create task -- provided the name of the task and description 
    clicked on run whether the user is logged in or not and run with highest privileges 
3.in triggers -->new --> onetime --ok 
4.Action --> new--> action :start a program -- program script: where i kept my batch file.
5.cliked on finish 
6. i can able to find the task in task schedular but it is not showing as running 

I need assistance in Actions tab我需要操作选项卡中的帮助

changes in only 4 th point,it is working as expected仅在第 4 点发生变化,它按预期工作

 1.open task schedular 
 2.create task -- provided the name of the task and description 
clicked on run whether the user is logged in or not and run with highest 
 privileges 
 3.in triggers -->new --> onetime --ok 
  4.Action --> new--> program/script: where I kept my batch file.
   5.cliked on finish 

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

相关问题 用于重命名和移动文件的 Python、bat 文件和任务计划程序 - 在 Windows 10 中无法正常工作 - Python, bat file, and Task Scheduler to rename and move files - not working properly in Windows 10 Python 脚本不会从 .bat 文件、任务计划程序或 cmd 提示符运行 - Python script won't run from .bat file, Task Scheduler, or cmd prompt Windows 调度程序中的 bat 文件未运行 python 脚本 - bat file in Windows scheduler not running python script 如何使用日志文件在任务计划程序中配置bat文件? - How to configure bat file in task scheduler with log file? 使用任务计划程序和bat文件运行Python脚本不起作用 - Running Python Scripts using task scheduler and bat files not working 如何在不使用 Windows 任务计划程序的情况下安排运行 bat 文件? - How to schedule running a bat file not using Windows Task Scheduler? 批处理文件未在任务计划程序中运行python脚本 - Batch file not running python script in task scheduler python中的分布式任务调度程序? - Distributed task scheduler in python? 批处理文件中的Python脚本无法在任务计划程序中运行 - Python script from batch file won't run in task scheduler Task Scheduler启动的Python脚本无法编辑文件 - Python script started by Task Scheduler can't edit file
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM