Task scheduler- task completed "successfully" with exit code 0x8007001

  1.    18 Jan 2017 #1

    Task scheduler- task completed "successfully" with exit code 0x8007001

    I am running a daily task which is supposed to
    - wake the computer from hibernation
    - copy a file to a network drive, and create a log file
    - shutdown the computer

    When starting the task manually from within the task scheduler, everything is executed as intended.

    When leaving the computer in hibernation mode, the task scheduler wakes the computer at the specified time, but apparently the command file (.cmd) ist not executed at all. No log file ist created, no file is copied, and the computer is not shut down. The task is marked as "successfully completed with the return code 0x80070001" displayed in decimal (2147942401).
    This error code seems to indicate an "illegal function", but I have no clue what that might be, especially since the task runs fine when started manually, as said.

    Any hint highly appreciated, questions welcome.
      My ComputerSystem Spec

  2.    18 Jan 2017 #2

    Hi, suggest you take the problem apart.
    1. Schedule a task to resume from hibernation but to do something simple like execute a bat file to display a message or open file explorer, timed to run while you are there.
    2. Check this runs ok.
    3. When this works satisfactorily, add your command to the bat file.
    4. Check the result.
    Check the result.

    Note: you say no log file is created, but presumably there would be a report in the event log.
    You might get further info from that (event viewer).

    Another thought- as you are using a network, if, say, your scheduled task is run overnight, is there anything differently configured then?
      My ComputerSystem Spec

  3.    18 Jan 2017 #3

    As a matter of fact I have another task running weekly and reliably at night with the same task settings (different actions and trigger), and accessing the same NAS. Which is why I'm puzzled. No changes to the network at any time.
    I'm not sure how to use the event viewer, a hint woud be great.
    Thx and cheers, Steinspecht
      My ComputerSystem Spec

  4.    18 Jan 2017 #4

    Hi, so the differences between the two tasks may suggest ways to take the problem apart.
    For example, do both resume from hibernation?

    Howtogeek is a useful site:
    What Is the Windows Event Viewer, and How Can I Use It?
    Windows Admin: Using Event Viewer to Troubleshoot Problems
    How to Create Your Own Windows Event Log Notification System
    Look Up Event IDs from the Event Viewer Using a Free Tool
      My ComputerSystem Spec

  5.    18 Jan 2017 #5

    I appreciate the notion of taking a problem apart. However, as said, the two tasks differ only in the actions (i.e., different commad scripts) and triggers (different execution times). Both start at the specified times which I can see in the scheduler protocol. One executes the command script, the other one does not. I can tell because both command scripts redirect their output to a log file. One does what it's supposed to (i.e. a weekly backup), the other does not (I.e. copyying a file each night). It still records the task as successfully completed with the return code mentioned in my initial post. If I only knew what exactly it means. Web research only mentions it in the connection with Windows backup and restore, something my command script doesn't invoke.

    I shall now look at the links you provided - thanks a lot!
      My ComputerSystem Spec

  6.    23 Jan 2017 #6

    Back after a while in frustration.
    I couldn't find anything suspicious in the event viewer at or around the times the task was started. There are some informational things recorded about "Music.UI (9036) {7FAAB28B-5CC2-407F-BD83-28FE53F0BA3C}:" and a protocol file C:\Users\Andrei\AppData\Local\Packages\Microsoft.ZuneMusic_8wekyb3d8bbwe\LocalState\Database\anonymo us\edb.log", apparently about a database module doing something about a logfile (I don't use MicrosoftZuneMusic and have no idea what this is!).

    The error message in my first posting header should read "0x80070001", one zero was missing there.

    Still no clue what to look for.
      My ComputerSystem Spec

  7.    23 Jan 2017 #7

    Have you tried what I suggested in #2?
      My ComputerSystem Spec

  8.    23 Jan 2017 #8

    Yes this all works. But not when re-activating the computer shortly after midnight via the task scheduler. It looks like cmd.exe ist never started, therefore the comand script is not run. Then I get this weird return code.

    Do you know anything about it? That is the only question I have.
      My ComputerSystem Spec

  9.    23 Jan 2017 #9

    My guess is you might need a delay. Beyond that I'll leave it to someone else. Good luck!
      My ComputerSystem Spec

  10.    23 Jan 2017 #10

    the script has a delay of 3 minutes, but what use if it never runs. how do i delay starting a job in the scheduler which is set to start at time x??
      My ComputerSystem Spec


Related Threads
Without any apparent reason (no update, no new software installed") the task scheduler issues this message, followed by "Task Scheduler will attempt to reconnect to it." Clicking OK repeats the message, clicking on X too, so the task scheduler can...
Hey everyone I tried using this guide (How To Easily Send Emails From The Windows Task Scheduler) to create a task that will send me an email whenever someone connects with RDP.The task works and sends the email if i run it, but i am unsure how to...
When I use Task Scheduler to launch a video (MP4) with VLC, at startup, the video stops several times, for a second or two. Am I doing something wrong, or is this a problem in Windows.
Is there a way to make the "Command Prompt" window show when I have a task running in Windows task Scheduler? I would like to be able to view the progress of the task. For example, I have a program called "Zap2xml" that collects TV EPG data. It...
My issue is kind of strange. I am an insider currently on Windows 10 build 10240. All the build I have tried so far has this same error in task scheduler when I change my time zone to my current location which is kathmandu (UTC+5:45). When i change...
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 20:58.
Find Us