Welcome to MSDN Blogs Sign in | Join | Help

Redirecting scheduled task output to a file.

Scheduled task is very helpful, the problem that I had, I was unable to get the output of the batch process that was executed by the scheduled task.

I tried to redirect the output using > as follow:

Batchfile > C:\Batch_Result.txt


and nothing happened. I do not know why.

The solution was actually very simple, use >> instead of >

Batchfile >> C:\Batch_Result.txt

It works great, even better, whenever the scheduled task is executing the batch file, the result is appended at the end of the text file instead of rewriting it. I simply added a simple date /t command, and I know exactly my scheduled task result at any given day.
Published Friday, May 05, 2006 7:25 AM by HelloWorld

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

No Comments

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker