是否有可能从任务计划程序启动一个批处理文件时,显示命令提示符窗口? [英] Is it possible to show the command prompt window when launching a batch file from the task scheduler?

查看:255
本文介绍了是否有可能从任务计划程序启动一个批处理文件时,显示命令提示符窗口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

至于我的标题状态,我想知道是否有可能以显示命令提示符窗口(至少是暂时的),以确保如期确实正在执行我的批处理文件。该批处理文件无差错运行,当我手动运行它。

As my title states, I am wondering if it is possible to show the command prompt window (at least temporarily) to ensure that my batch file is indeed being executed as scheduled. The batch file runs without errors when I run it manually.

该批处理文件驻留在Windows Server 2008 R2标准版,x64的上我有安装Service Pack 1。让我知道是否需要更多的信息。

The batch file resides on Windows Server 2008 R2 Standard, x64 and I have service pack 1 installed. Let me know if more info required.

谢谢了!

推荐答案

如果你想捕捉到的输出,我喜欢转储到一个日志文件。把这个作为你的程序在任务计划程序执行:

If you are trying to capture output, I like to dump to a log file. Put this as your program to execute in Task Scheduler:

myscript.bat >> error.log

如果你真的想保持开放,你可以做 -

If you REALLY want it to stay open, you could do -

cmd /k myscript.bat

这篇关于是否有可能从任务计划程序启动一个批处理文件时,显示命令提示符窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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