Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
611 views
in Technique[技术] by (71.8m points)

batch file - How do I capture the output of a script if it is being ran by the task scheduler?

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Try this as the command string in Task Scheduler:

cmd /c yourscript.cmd > logall.txt

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...