Need help with Task Scheduler

Greywolf74

Distinguished
Jan 27, 2015
37
2
18,535
I use Sync Toy to do nightly back ups of my PCs. 3 PCs total. 2 x Win11 and 1 x Win10. all 3 Enterprise edition. Theyre all set up to run in the middle of the night using task scheduler.

One of my windows 11 machines isnt running Sync Toy via task scheduler and I cant figure out why. Task scheduler is set up exactly the same on all 3 PCs with the exception of the user account it is set to run with is obviously set to the user account on that specific machine. That user account is part of the administrators group just like it is on my other two PCs. Sync Toy runs outside of task scheduler fine. Task scheduler says it starts running the task but it only runs for literally 1 second and then its supposedly done. There has to be something different in Windows itself Im guessing but if thats the problem I dont know where to look that I haven't looked already.

Heres an export of the task scheduler entry if you want to see it but it works on the other two machines so I highly doubt theres anything wrong with the task itself.


System specs:

CPU: AMD Ryzen 9 5900X
CPU cooler: Phanteks Glacier One 240MP D-RGB AIO
Motherboard: GIGABYTE X570S AORUS MASTER
Ram: G.SKILL Ripjaws V Series 32GB (2 x 16GB)
SSD/HDD: OS drives are WD BLACK SN850 NVMe M.2 2280 500GB PCI-E 4.0 x4 run in Raid 1 + various SSDs/HDDs for storage.
GPU: GIGABYTE RTX 3080 Ti
PSU: CORSAIR GS800 800 W
PSU Purchase Date: 8-10 years ago?
Chassis: LIAN LI LANCOOL II MESH RGB BLACK Tempered Glass ATX Case
OS: Windows 10 Enterprise Ed.
Monitor 1: ASUS TUF Gaming 27" 1440P Monitor (VG27AQL1A) - QHD (2560 x 1440), IPS, 1ms, 170Hz
Monitor 2: BenQ 27" VA LCD Monitor 4ms (GTG) 1920 x 1080 GW2750HM
Monitor 3: SAMSUNG 24" LCD Monitor 5ms (GTG) 1920 x 1080 S24A460B-1
Monitor 4: Same as #3
 
Do an export on the other two Windows 11 computers that are working correctly.

Compare the three system exports and look for some difference in the export.

In the posted export I noted:


" <RegistrationInfo>
<Date>2015-01-24T12:33:31.7162582</Date>
<Author>FILE-SERVER\Administrator</Author>
<URI>\Sync Toy\SyncToy</URI>
</RegistrationInfo>
<Triggers>
<CalendarTrigger>
<StartBoundary>2015-01-24T02:30:00</StartBoundary>"


Not sure about those referenced 2015 dates:

Check the source for the date and time on the system failing to run Sync Toy.

= = = =

Failing that, then look in Reliability History and Event Viewer.

Either one or both tools may be capturing some error code, warning, or even an informational event when Sync Toy fails to run.

Start with Reliability History. Much more end user friendly and the timeline format may reveal a pattern.

Event Viewer requires more time and effort to navigate and understand.

To help with Event Viewer:

How To - How to use Windows 10 Event Viewer | Tom's Hardware Forum (tomshardware.com)
 
Do an export on the other two Windows 11 computers that are working correctly.

Compare the three system exports and look for some difference in the export.

In the posted export I noted:


" <RegistrationInfo>
<Date>2015-01-24T12:33:31.7162582</Date>
<Author>FILE-SERVER\Administrator</Author>
<URI>\Sync Toy\SyncToy</URI>
</RegistrationInfo>
<Triggers>
<CalendarTrigger>
<StartBoundary>2015-01-24T02:30:00</StartBoundary>"


Not sure about those referenced 2015 dates:

Check the source for the date and time on the system failing to run Sync Toy.

= = = =

Failing that, then look in Reliability History and Event Viewer.

Either one or both tools may be capturing some error code, warning, or even an informational event when Sync Toy fails to run.

Start with Reliability History. Much more end user friendly and the timeline format may reveal a pattern.

Event Viewer requires more time and effort to navigate and understand.

To help with Event Viewer:

How To - How to use Windows 10 Event Viewer | Tom's Hardware Forum (tomshardware.com)
That 2015 date is just when I first created the task. Originally I only set SyncToy up on one computer back in 2015. All of the TaskScheduler events Im using were exported from my original Windows Home Server 2011 File-Server build. I imported that task back on to the File Server after I rebuilt it and put Win11 Ent Ed on it and it still works. I imported that same task into my Win10 Ent Ed PC and it works there too. Its only on my other Win11 PC that its not running properly and I imported the task from the same export I used for the other PCs, of course changing the trigger time and the account that it runs the task with. That account is the main account on the PC that account is part of the Administrators group all other settings are the same. Ive also been over the task settings of the non working task vs the working ones and again they are identical except for the two aforementioned items. I even tried recreating the event from scratch following the settings of one of the working PCs and that did nothing different. I cant imagine its a problem with the task itself.

I exported all of the event viewer info so you can take a look at it but the only event that I can find that seems to coincide with the 3:30am trigger is in the Security log but it just shows two successful "logon" and then a "special logon" entry but these are basically the same when compared against the security events for one of the working computers whos trigger is at 11:30pm. Im also attaching that export as well. Task Scheduler seems to think that the event is running successfully, at least if you look at the history tab of the task. Ive exported that to a .evtx file also so you can see. It clearly thinks that it completed the task. Im just a power user though, maybe you'll see something in all of this that I dont?

Reminder if you go to look at the matching events in the two security EV logs the non working computer has a trigger time of 3:30am and the working PC has a trigger of 11:30pm.

EV Viewer Files

Just a little P.S. for clarity's sake. I do believe Win11/task scheduler believes that it is running SyncToy but it doesnt actually run. If you look at the history info I exported you'll see that it says "task completed" but the length of time it runs is 1 or 2 seconds meaning it clearly didnt run.
 
Last edited:
The EV files seem to require downloading to view.... Not part of my SOPs.

Re: "task completed".

Sync Toy is doing some sort of testing and, in the case of the non working computer, may be deciding that no backups are necessary - for whatever reasons.... So Sync Toy does indeed stop running after 1 or 2 seconds.

Three immediate things that can be done:


1) Is there a "clock" on the destination target drive/computer for the backups? Check that all computers are obtaining and using a common source for date and time and that those dates and times are correct for your area.

Just for testing/learning purposes change the non working computer trigger time from 3:30 a.m. to the "working" time of 11:30 p.m. used by the two working computers. My thought being that something in the process used by the non working computer believes (because of some time/date differences) that the sync has already been completed and simply stops after that 1 or 2 seconds.

11:30 p.m. being one day/date and 3:30 a.m. being the next day/date.....

2) I do believe that Event Viewer is providing some clues so continue monitoring the logs. However, add the use of Process Explorer (Microsoft, free) to watch and compare what happens with respect to Sync Toy.

Open the Process Explorer Window on the working computers and also the non working computer. Leave the Process Explorer window open in order to observe what happens (or does not happen) when Sync Toy is triggered. I would expect to see some process briefly appear and dissapear on the non working computer.

3) Remember to look in Reliability History/Monitor on all three computers. Reliability History is much more end user friendly and the timeline format may reveal patterns.

Compare the working computer's patterns to the pattern of the non working computer.

https://learn.microsoft.com/en-us/sysinternals/downloads/process-explorer

Lastly: if there is a section of an Event Viewer log in question then just copy and paste that section into a post versus the need for a file download.

Just be sure to lable the log in question to identify the source computer and highlight the lines of interest.
 
The EV files seem to require downloading to view.... Not part of my SOPs.

Re: "task completed".

Sync Toy is doing some sort of testing and, in the case of the non working computer, may be deciding that no backups are necessary - for whatever reasons.... So Sync Toy does indeed stop running after 1 or 2 seconds.

Three immediate things that can be done:

1) Is there a "clock" on the destination target drive/computer for the backups? Check that all computers are obtaining and using a common source for date and time and that those dates and times are correct for your area.

Just for testing/learning purposes change the non working computer trigger time from 3:30 a.m. to the "working" time of 11:30 p.m. used by the two working computers. My thought being that something in the process used by the non working computer believes (because of some time/date differences) that the sync has already been completed and simply stops after that 1 or 2 seconds.

11:30 p.m. being one day/date and 3:30 a.m. being the next day/date.....

2) I do believe that Event Viewer is providing some clues so continue monitoring the logs. However, add the use of Process Explorer (Microsoft, free) to watch and compare what happens with respect to Sync Toy.

Open the Process Explorer Window on the working computers and also the non working computer. Leave the Process Explorer window open in order to observe what happens (or does not happen) when Sync Toy is triggered. I would expect to see some process briefly appear and dissapear on the non working computer.

3) Remember to look in Reliability History/Monitor on all three computers. Reliability History is much more end user friendly and the timeline format may reveal patterns.

Compare the working computer's patterns to the pattern of the non working computer.

https://learn.microsoft.com/en-us/sysinternals/downloads/process-explorer

Lastly: if there is a section of an Event Viewer log in question then just copy and paste that section into a post versus the need for a file download.

Just be sure to lable the log in question to identify the source computer and highlight the lines of interest.
I finally figured out the issue. On the computer that wasnt working, the source drives are on a different computer. I had mapped these network drives to the PC and then set up folder pairs based on the mapped drive. Thats fine for SyncToy.exe. It will run those, but SyncToyCMD.exe will not. Once I changed the source paths to actual network paths (\\server\drive) instead of the mapped drive path then it worked without any issues.

Just FYSA, If SyncToy actually runs from Task Scheduler it take at least a 2.5-3 minutes for it to scan even just 500GB of data to see if there are any changes. Your statement about it only needing a couple of seconds to check for changes is not accurate.

Thanks for your help.