简体   繁体   English

我的 Python 脚本无法从任务计划程序运行

[英]My Python Script does not run from Task Scheduler

I have a script which I want to run on a daily basis at the same time, automatically.我有一个脚本,我想每天同时自动运行它。 I tried to use Windows Task Scheduler.我尝试使用 Windows 任务计划程序。 but no luck so far.但到目前为止还没有运气。 FYI I can run the same script from the console without any issue.仅供参考,我可以从控制台运行相同的脚本,没有任何问题。

I tried我试过了

where python   
C:\Users\name\Anaconda3\python.exe  
C:\Users\name\AppData\Local\Programs\Python\Python38\python.exe   
C:\Users\name\AppData\Local\Microsoft\WindowsApps\python.exe

on TaskScheduler在任务调度器上

Program/script:     "C:\Users\name\AppData\Local\Programs\Python\Python38\python.exe"
Add arguments:       Nomura_Daily_PnL_Check.py
Start in:           "C:\Users\name\Jobs\scripts_need_to_run_daily"

when the scheduled time come, literally nothing happens.当预定的时间到来时,实际上什么也没有发生。 No error, No output, nothing!没有错误,没有输出,什么都没有!

what is wrong in this process?这个过程有什么问题?

try mentioning values without double inverted commas, like:尝试提及没有双引号的值,例如:

Program/script:     C:\Users\name\AppData\Local\Programs\Python\Python38\python.exe
Add arguments:       Nomura_Daily_PnL_Check.py
Start in:           C:\Users\name\Jobs\scripts_need_to_run_daily

Also first try to run a simple program, lets say a python program which will write to a file so that you will know whether task is failing or there is some issue with your program.另外首先尝试运行一个简单的程序,假设一个 python 程序将写入文件,以便您知道任务是否失败或您的程序是否存在问题。

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

相关问题 任务调度程序运行我的 python 脚本,但它什么也不做 - Task scheduler run my python script but it does nothing 为什么Windows 10 Task Scheduler执行我的Python脚本时会产生不同的运行 - Why does my Python script run differently when executed by Windows 10 Task Scheduler 任务计划程序打开命令提示符但不运行 python 脚本 - Task Scheduler opens command prompt but does not run python script 批处理文件中的Python脚本无法在任务计划程序中运行 - Python script from batch file won't run in task scheduler 从任务调度程序运行 python 脚本作为任务 - Running a python script as task from task scheduler Python 脚本不会在任务计划程序中运行“无论用户是否登录都运行” - Python script will not run in Task Scheduler for "Run whether use is logged on or not" 如何通过任务计划程序计划从虚拟环境运行的python脚本 - How to schedule a python script to run from virtual environment via task scheduler 从 Edge 下载文件时,如何在 Windows 任务计划程序中运行 Python 脚本? - How to run a Python script in Windows Task Scheduler when a file is downloaded from Edge? Python 脚本不会从 .bat 文件、任务计划程序或 cmd 提示符运行 - Python script won't run from .bat file, Task Scheduler, or cmd prompt 无法安排 python 脚本通过 Windows 任务计划程序运行 - Cannot schedule a python script to run through Windows Task Scheduler
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM