我如何捕获脚本的输出,如果它正在被任务调度跑了? [英] How do I capture the output of a script if it is being ran by the task scheduler?

查看:173
本文介绍了我如何捕获脚本的输出,如果它正在被任务调度跑了?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Windows Server 2008,我怎么去捕捉正在运行的Windows任务调度程序脚本输出?

Using Windows Server 2008, how do I go about capturing the output of a script that is being ran with the windows task scheduler?

我测试一个相当长的自定义打印批处理脚本,并进行调试,我希望看到所有的输出从它每一个夜晚。

I'm testing a rather long custom printing batch-script, and for debugging purposes, I would like to see all of the output from it every night.

推荐答案

您可以调用yourscript.cmd一个debug.cmd

You can have a debug.cmd that calls yourscript.cmd

yourscript.cmd > logall.txt

您安排debug.cmd而不是yourscript.cmd

you schedule debug.cmd instead of yourscript.cmd

这篇关于我如何捕获脚本的输出,如果它正在被任务调度跑了?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆