20

Server 2008 R2 (fully patched)

I'm trying to run a scheduled task to move a specify type of files from C:\Windows\Temp to E:\Foo_blah_blah_blah_blah\Foo2 and for some reason am getting the following error:

Task Scheduler failed to start instance "{fe0f148a-cece-44a0-a4d1-914aaf21daa8}" of "\Move Temp Files" task for user "FOOBOX\Administrator". Additional Data: Error Value: 2147942402

Any idea why this is happening?

Additional details:

  • The task is configured to run as an account that has authority to move the file.
  • The task is configured to run whether user is logged on or not. It fails for both scenarios - same errors.
  • The task is configured to run for the local OS (Windows Server 2008)
  • The command is broken up into two parts. Program/script: move Add Arguments: C:\Windows\Temp\*.foo E:\Foo_blah_blah_blah_blah\Foo2\

If I run this same command move C:\Windows\Temp\*.foo E:\Foo_blah_blah_blah_blah\Foo2\ from the windows command prompt, it works fine.

What am I missing?

  • 7
    Well, if you convert 2147942402 into hex, you get 0x80070002, which means "File not Found." – Ryan Ries Dec 4 '13 at 23:00
32

As Ryan Ries pointed out, 2147942402 translates to "File not Found" - which is a very appropriate response. Try and press Win+R, put in "move" and press enter - that's the interactive equivalent of what your task is failing to do.

The reason is that MOVE is not a program, but a native command in cmd.

It should be:

Program: "cmd.exe"
Arguments: "/c move C:\Windows\Temp\*.foo E:\Foo_blah_blah_blah_blah\Foo2\"

1

The reason is: the Task is configured to be deleted when it is not scheduled to run again. This is configured in the Settings Tab. The deletion of the Task is done at the expiration time of the Trigger that fires the Task. If the expiration time of the trigger is exactly the same as the start time of the trigger it may (incidentally) happen that the Task is deleted a few seconds before its trigger fires. This causes the event 101 with reason code 2147942402. The solution is to set the expiration time of the trigger 1min later than the start time of the trigger.

-2

Maybe it's the problem of the blanks in the line of order example:

C:\Program Files\Wireshark\Wireshark.exe -i1 -k FAILS

"C:\Program Files\Wireshark\Wireshark.exe" -i1 -k OK

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.