Batch files configured in Task Scheduler do not run

Asked 2 years ago, Updated 2 years ago, 34 views

You are trying to run python from a batch file, but it does not run python from the batch even if you schedule it from the task scheduler or when the disclosure time comes.

The batch and python files are in the same folder.
If you run it manually from the task scheduler, python runs.

@echo off
python.exe C:\work\Script\actual\subpro.py
python.exe C:\work\Script\actual\Speed-test.py

If you know the cause, please let me know.

windows

2022-09-30 19:42

1 Answers

Either the batch itself is not running, or the batch has been running, but python.exe has not been found and has not been running as a result.

Python is irrelevant for the former.Review your settings.

In the latter case, for example, check the environment variable PATH, which may not pass through python.exe.

Regardless of batch or Python, they said they were not able to run it in the first place. They reviewed the configuration and made it possible to run it.

When I checked the history of the task scheduler, I found that the startup request was ignored.US>The instance is already running.After looking at the workaround, I was able to launch at the specified time by selecting Run new instances in parallel in the Task Scheduler's Task Properties → Rules that apply when a task is already running.


2022-09-30 19:42

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.