Re: Error code 4 for Task Scheduler

From: Pegasus \(MVP\) (I.can_at_fly.com)
Date: 01/22/05


Date: Sat, 22 Jan 2005 11:32:24 +1100


"ctdak" <ctdak@discussions.microsoft.com> wrote in message
news:37927815-9032-44FC-921B-3FB0675F46EE@microsoft.com...
> I am getting an error code 4 upon a scheduled task trying to run. The
task
> is running an MS-DOS batch file with an XCOPY command in it to transfer
some
> files. The batch file runs fine when run manually, so I think it has
> something to do with running after hours when not logged in. Does anyone
> know exactly what this error code indicates? I don't want to pay $200 for
> the MS Driver Dev Kit which supposedly explains these codes.
> Thanks.
>

Most task scheduler error codes are generated by the command
you're running, i.e. xcopy.exe in your case. Add some basic
diagnostics and you'll soon see what's going on:

xcopy /s /y /.... "c:\SomeFolder\..." "d:\Other Folder\..."
1>c:\test.log 2>c:\test.err

What do the two log files tell you when you run the job?



Relevant Pages

  • Error code 4 for Task Scheduler
    ... I am getting an error code 4 upon a scheduled task trying to run. ... is running an MS-DOS batch file with an XCOPY command in it to transfer some ... The batch file runs fine when run manually, ...
    (microsoft.public.win2000.general)
  • Re: Compiling m-file to C
    ... It starts compiling from m- ... operable program or batch file. ... (error code = 1). ... Error executing mcc, return status = 1. ...
    (comp.soft-sys.matlab)
  • Re: Changing "Failed" Error Code
    ... A two line batch file: ... updated", but, SMS interprets this as a Failure in the Log. ... Is it possible to intercept this, so that the Error Code of 44 is not ...
    (microsoft.public.sms.admin)
  • Re: Error code 4 for Task Scheduler
    ... If it involves network resources, make sure the user account has permissions ... |I am getting an error code 4 upon a scheduled task trying to run. ... The batch file runs fine when run manually, ...
    (microsoft.public.win2000.general)
  • Re: remote machine execution
    ... ECHO will always works, BUT if u ever pass parameters to batch file, it will ... cmd.exe exited on host with error code 0. ... That's four working variants. ...
    (microsoft.public.windows.server.scripting)