FileNotFoundError: [Errno 2] 在任务调度程序中运行 python sript 时没有这样的文件或目录

问题描述 投票:0回答:0

我需要为 python 脚本 clculator.py 安排任务。 有一个 bat 文件 marg_calculator.bat。手动运行时一切正常。

但是每次我尝试在任务调度程序中运行 bat 文件时,在 cmd 中以“FileNotFoundError: [Errno 2] 没有这样的文件或目录”结尾,并提到位于磁盘 R 上的文件“actions.xlsx”:(这是一个网络驱动器)。

我使用绝对路径名,手动运行 bat 文件时一切正常。

请帮忙!))

我试图提供一个位置为“R:/HQ/..../actions.xlsx”以及“\hq.ru.corp...../actions.xlsx”。没有帮助 此外,尝试以我的用户帐户和系统用户帐户运行。

python batch-file scheduled-tasks windows-task-scheduler
© www.soinside.com 2019 - 2024. All rights reserved.