【问题标题】:Scheduled Run of batch not logging output to file批处理的计划运行未将输出记录到文件
【发布时间】:2015-03-13 10:34:42
【问题描述】:

我有两个批处理文件,一个调用另一个

1)test1.bat 有内容ping 127.0.0.1

2) test.bat 有内容 call "D:\test1.bat" >>output1.txt 2>>&1

当我双击test.bat 时,正如预期的那样,输出将登录到output1.txt。但是,当我安排相同的 test.bat 文件时,没有任何记录。

我正在使用普通的 Windows 任务调度程序来安排这个。我在这里错过了什么?

【问题讨论】:

  • windows任务调度器的工作目录在哪里?我想你会在那里找到你的 output1.txt;或尝试call "D:\test1.bat" >> D:\output1.txt 2>>&1
  • 哎呀,是的!这就是问题所在。请提及它作为答案,我会标记这个

标签: windows batch-file cmd scheduled-tasks


【解决方案1】:

windows任务调度器的工作目录在哪里?我想你会在那里找到你的 output1.txt;或者试试call "D:\test1.bat" >> D:\output1.txt 2>>&1

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-03-01
    • 1970-01-01
    • 2022-01-23
    • 1970-01-01
    • 2014-09-14
    • 2014-03-15
    • 2019-04-06
    • 1970-01-01
    相关资源
    最近更新 更多