Redirecting stdout to log file in Task Scheduler

Posted on 2004-11-22
Last Modified: 2010-05-18
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?
Question by:iamtsubasa
    LVL 95

    Expert Comment

    by:Lee W, MVP
    Not sure if this is something you can use, but there are commands like "tasklist" and "taskkill".
    LVL 6

    Accepted Solution

    > 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

    LVL 1

    Author Comment

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

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    Dell Latitude D610 will not boot up. 71 172
    Compatiable modem 2 51
    symbolic link problem 6 73
    Clone HDD in RAID1 10 97
    It is only natural that we all want our PCs to be in good working order, improved system performance, so that is exactly how programs are advertised to entice. They say things like:            •      PC crashes? Get registry cleaner to repair it!    …
    If you have done a reformat of your hard drive and proceeded to do a successful Windows XP installation, you may notice that a choice between two operating systems when you start up the machine. Here is how to get rid of this: Click Start Clic…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now