Share via


Why Task Scheduler runs only the first action from the action list after upgrade from Win10 to Win10 Anniversary update

Question

Saturday, September 17, 2016 7:54 PM

I have had a task in task scheduler for years that has a handful of robocopy commands with respective RJC files that backup my files to a NAS drive. 

It has been running successfully but now after I installed Win10 anniversary update it only runs the first robocopy command (succesfully) on the list and not the remaining ones. I don't see any errors anywhere in task schedule or in the event viewer (I was looking at all the windows logs and app logs specifically for task scheduler in the event viewer). When I run the commands manually from elevated CMD they run just fine. I also tried re-entering my user name & PW for the task as it as been the issue in the past after some upgrades but that did not help either.

The robocopy commands are basically all the same with same options in RJC files and flags except for output to different log file and the source and destination folders are different but all between the same local HDD and the NAS drive.

Also, I have another task which is similar but instead takes the backup to USB drive. It is now having the same problem after the upgrade.

Any idea what is wrong or how to troubleshoot the issue?

All replies (15)

Monday, October 10, 2016 8:11 AM âś…Answered

Hi,

If so, please only use the query parameter to list all tasks to confirm this task is invalid and exists.

Syntax

schtasks [/query] [/fo {TABLE | LIST | CSV}] [/nh] [/v] [/s computer [/u [domain\user /p password]]

For more information about this command, please read this article:

https://technet.microsoft.com/en-in/library/bb490996.aspx

Please remember to mark the replies as an answers if they help and unmark them if they provide no help.
If you have feedback for TechNet Subscriber Support, contact [email protected].


Saturday, September 17, 2016 9:44 PM

Any event under Event Viewer > Application and Services Logs > Microsoft > Windows > TaskScheduler > Maintenance show any clues?

Is there a C:\Windows\Tasks\SchedLgU.txt files with any clues?

Do the task show a next run or last run date?

Try editing \ re-entering more settings on the Tasks and see if that helps (that does rewrite the settings and can help in situations, so interesting you have tried the username, try the schedule as well)


Sunday, September 18, 2016 1:22 AM

NO events like I said above that would indicate anything wrong.

no txt files

yes, they do have last & next date

I did that too

nothing seems wrong but it only runs the first action on the list


Sunday, September 18, 2016 10:21 AM

So sorry just to clarify you mean the tasks do not run, so it runs the first task in the list but any further ones. Or the tasks run but only the first line of the cmd file runs?

Be worth checking the system so have a look at System file check (SFC) Scan and Repair System Files & DISM to fix things SFC cannot (guide by Team ZigZag).


Monday, September 19, 2016 12:12 AM

Yes. That's what I meant. Only the first action/task gets executed within scheduled task or if I run it manually.   thanks for the link I'll check it out


Monday, September 19, 2016 6:32 PM

Can you post a one the scripts if that is suitable?

If you create script with just a simple multiple lines that can be checked does that work?

set filedate=%Date:~-4,4%-%Date:~-7,2%-%Date:~-10,2%_%Time:~0,2%-%Time:~3,2%
echo Line1 > "%USERPROFILE%\Desktop\filedate% Line1.txt"
echo Line2 > "%USERPROFILE%\Desktop\filedate% Line2.txt"
echo Line3 > "%USERPROFILE%\Desktop\filedate% Line3.txt"
echo Line4 > "%USERPROFILE%\Desktop\filedate% Line4.txt"
echo Line5 > "%USERPROFILE%\Desktop\filedate% Line5.txt"

Saved as CMD as task would create a file on each line so would know if each line works.


Tuesday, September 20, 2016 4:18 PM

I have the same issue, but if you go into the settings tab for the task and change the drop down menu for "If the task is already running..." from "Stop the existing instance" to "Do not start a new instance", then this fixes the problem and all of the actions are executed. However, I would still like to use "Stop the existing instance" option instead of the workaround above. Any thoughts on what has changed to make this option only run the first action and that's it?


Tuesday, September 20, 2016 8:05 PM

Mine already had that same setting. I tried changing that to different values but it does not seem to have no impact on mine. Same problem exists.

Something has definitely changed that broke it as it has been working for years for me in different versions of Windows until the Anniversary Update.

My workaround was a bit more tedious to make mine work. I took the actions from that task and put them in their own scheduled task and it works now. But now instead of having only one task scheduled I have it now split into a handful of tasks.

All the actions I have there are very simple in this basic format:

robocopy /job:d\filename.RJC

all the RJC files are basically except for the different source & destination directories so I don't believe there are any issues with them as it works fine if I put them in individually scheduled tasks each as I mentioned above.


Tuesday, September 20, 2016 9:20 PM

I contacted Microsoft about the issue and they told me that a Windows 10 update would fix the problem; however, the problem still occurs. This is version 1607.


Tuesday, September 20, 2016 10:27 PM

I thought I would set a task and test in Insider Build 14926 (the main build I run), but the task does not even run :( The Next Run Time gets updated the Last Run Time does not. The task runs manually fine but cannot get the task to run on schedule. So huh. Does not run the first line let alone the six lines.


Tuesday, September 27, 2016 12:28 AM

-Mr Happy-:

Can you run:

schtasks /query /tn "FullPathToYourTaskThatIsFailing" 

schtasks /query /tn "FullPathToYourTaskThatIsFailing" /xml

An Example "FullPathToYourTaskThatIsFailing" would be "OneDrive Standalone Update Task v2". 

This posting is provided AS IS with no warranties, and confers no rights.


Tuesday, September 27, 2016 6:01 PM

-Mr Happy-:

Can you run:

schtasks /query /tn "FullPathToYourTaskThatIsFailing" 

schtasks /query /tn "FullPathToYourTaskThatIsFailing" /xml

An Example "FullPathToYourTaskThatIsFailing" would be "OneDrive Standalone Update Task v2". 

This posting is provided AS IS with no warranties, and confers no rights.

Thank you for the response, I am running the Insider build and this not my thread. So was this aimed at pekkan4 the OP?


Tuesday, September 27, 2016 10:37 PM

I'll give it a try and let you know what happens.


Tuesday, September 27, 2016 11:00 PM

I keep getting an error. I've tried both with RJC and the XML files and it claims it can't find the file. I am 100% sure I am typing the file name correct with full path

Here are examples

D:\dir photostohomevault.rcj
 Volume in drive D is Data
 Volume Serial Number is 12F3-E445

 Directory of D:\

09/27/2012  10:43 PM             1,472 PHOTOStoHomeVault.RCJ
               1 File(s)          1,472 bytes
               0 Dir(s)  472,110,497,792 bytes free

D:\schtasks /query /tn d:\PHOTOStoHomeVault.RCJ /xml
ERROR: The filename, directory name, or volume label syntax is incorrect.

D:\schtasks /query /tn d:\PHOTOStoHomeVault.RCJ
ERROR: The filename, directory name, or volume label syntax is incorrect.

D:\dir "d:\Backup Videos, Music, Photos and Family docs to USB (L-drive).xml"
 Volume in drive D is Data
 Volume Serial Number is 12F3-E445

 Directory of d:\

06/07/2013  02:02 PM             5,386 Backup Videos, Music, Photos and Family docs to USB (L-drive).xml
               1 File(s)          5,386 bytes
               0 Dir(s)  472,110,497,792 bytes free

D:\dir "d:\Backup  Videos, Music, Family docs and Photos to HomeVault.xml"
 Volume in drive D is Data
 Volume Serial Number is 12F3-E445

 Directory of d:\

09/16/2016  12:39 PM             5,156 Backup  Videos, Music, Family docs and Photos to HomeVault.xml
               1 File(s)          5,156 bytes
               0 Dir(s)  472,110,497,792 bytes free

D:\schtasks /query /tn "d:\Backup  Videos, Music, Family docs and Photos to HomeVault.xml"
ERROR: The filename, directory name, or volume label syntax is incorrect.


Tuesday, September 19, 2017 6:28 AM

The issue has not been fixed and I am using the workaround you suggested. Thanks.