• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2347
  • Last Modified:

Redirecting stdout to log file in Task Scheduler

In WindowsXP Scheduled Task folder, I would like to log stdout and stderr for each job to a log file.  I tried something like this "exe.exe > test.log" but it doesn't work.  How does one log MSTask stdout/stderr information?
0
iamtsubasa
Asked:
iamtsubasa
1 Solution
 
Lee W, MVPTechnology and Business Process AdvisorCommented:
Not sure if this is something you can use, but there are commands like "tasklist" and "taskkill".
0
 
kapesCommented:
> works for commands started in "Command Processor" **CMD.EXE**, so batch file is OK. but... EXE might not give you stdout in log file....

Also try putting full path for log file i.e c:\logs\task1.log

or try this

cmd /c  exe.exe > c:\logs\task1.log


0
 
iamtsubasaAuthor Commented:
Using cmd /c works great!  Should have thought of that myself!  :)
Thanks, kapes.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now