• <tfoot id='lM0o7'></tfoot>

  • <small id='lM0o7'></small><noframes id='lM0o7'>

      <i id='lM0o7'><tr id='lM0o7'><dt id='lM0o7'><q id='lM0o7'><span id='lM0o7'><b id='lM0o7'><form id='lM0o7'><ins id='lM0o7'></ins><ul id='lM0o7'></ul><sub id='lM0o7'></sub></form><legend id='lM0o7'></legend><bdo id='lM0o7'><pre id='lM0o7'><center id='lM0o7'></center></pre></bdo></b><th id='lM0o7'></th></span></q></dt></tr></i><div id='lM0o7'><tfoot id='lM0o7'></tfoot><dl id='lM0o7'><fieldset id='lM0o7'></fieldset></dl></div>
        <legend id='lM0o7'><style id='lM0o7'><dir id='lM0o7'><q id='lM0o7'></q></dir></style></legend>
          <bdo id='lM0o7'></bdo><ul id='lM0o7'></ul>
      1. 如何安排不使用 Windows 任务计划程序运行 bat 文件?

        时间:2023-10-19
        <i id='X8MLA'><tr id='X8MLA'><dt id='X8MLA'><q id='X8MLA'><span id='X8MLA'><b id='X8MLA'><form id='X8MLA'><ins id='X8MLA'></ins><ul id='X8MLA'></ul><sub id='X8MLA'></sub></form><legend id='X8MLA'></legend><bdo id='X8MLA'><pre id='X8MLA'><center id='X8MLA'></center></pre></bdo></b><th id='X8MLA'></th></span></q></dt></tr></i><div id='X8MLA'><tfoot id='X8MLA'></tfoot><dl id='X8MLA'><fieldset id='X8MLA'></fieldset></dl></div>
          <bdo id='X8MLA'></bdo><ul id='X8MLA'></ul>

          <small id='X8MLA'></small><noframes id='X8MLA'>

            <tfoot id='X8MLA'></tfoot>
              <tbody id='X8MLA'></tbody>

          1. <legend id='X8MLA'><style id='X8MLA'><dir id='X8MLA'><q id='X8MLA'></q></dir></style></legend>
                1. 本文介绍了如何安排不使用 Windows 任务计划程序运行 bat 文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一个触发 Python 脚本的批处理 (*.bat) 文件,该脚本需要大约 25 分钟才能交互完成(通过手动命令提示符).这个批处理文件需要每天早上运行.

                  I have a batch (*.bat) file that triggers a Python script and this script takes about 25 minutes to complete interactivly (through command prompt manuallly). This batch file needs to run in the morning on a daily basis.

                  当我尝试在 Windows 任务计划程序上将其设置为计划任务并在那里运行时,它所花费的时间几乎是交互时间的两倍.即使我在 xml 中将优先级设置从默认的 7 设置为 4(更高优先级),也没有任何区别.更改优先级设置仅适用于 I/O 优先级,但不适用于内存优先级,内存优先级仍保持在 4(交互式运行的下一级为 5).内存优先级在支持长流程方面发挥着重要作用.

                  When I tried to set it as a Scheduled Task on Windows Task Scheduler and ran it there, it took nearly double the time than it did interactively. Even if I set the Priority settings from the default 7 to 4 (higher priority) in the xml, it didn't make any differnce. Changing the Priority settings only works for I/O Priority but does not work for Memory Priority, which still remains at 4 (1 level down the interactive run which is 5). Memory Priority plays an important role in supporting a long process.

                  我想知道是否有办法将 bat 文件作为计划任务触发,但不使用任务计划程序、任务计划程序的替代程序或脚本?

                  I am wondering if there is a way to trigger the bat file as a scheduled task but not using Task Scheduler, alternative program to Task Scheduler or scripts?

                  推荐答案

                  由于上面没有退出策略并且延迟至少25分钟,这个批处理文件代码可能更适合你的需要,在你的登录批处理或其他触发器...

                  As the above has no exit strategy and is delayed for at least 25 minutes, this batch file code may be better suited to your need, drop a reference into your login batch or other trigger...

                  @echo off
                  :loop
                  set timeHrs=%time:~0,2%
                  set timeMin=%time:~3,2%
                  set timeSec=%time:~6,2%
                  
                  if "%timeHrs%" geq 6 if "%timeHrs%" leq 9 (
                      [command to trigger Python script]
                      exit /b 0
                  )
                  
                  timeout /t 1500
                  goto loop
                  

                  这篇关于如何安排不使用 Windows 任务计划程序运行 bat 文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:子进程中带有变量的命令行 下一篇:用命令中断循环

                  相关文章

                    <i id='qTcW6'><tr id='qTcW6'><dt id='qTcW6'><q id='qTcW6'><span id='qTcW6'><b id='qTcW6'><form id='qTcW6'><ins id='qTcW6'></ins><ul id='qTcW6'></ul><sub id='qTcW6'></sub></form><legend id='qTcW6'></legend><bdo id='qTcW6'><pre id='qTcW6'><center id='qTcW6'></center></pre></bdo></b><th id='qTcW6'></th></span></q></dt></tr></i><div id='qTcW6'><tfoot id='qTcW6'></tfoot><dl id='qTcW6'><fieldset id='qTcW6'></fieldset></dl></div>

                  1. <small id='qTcW6'></small><noframes id='qTcW6'>

                      <bdo id='qTcW6'></bdo><ul id='qTcW6'></ul>
                  2. <legend id='qTcW6'><style id='qTcW6'><dir id='qTcW6'><q id='qTcW6'></q></dir></style></legend>
                    <tfoot id='qTcW6'></tfoot>