Won't Start Automatically with Task Scheduler Method on Windows 11 22H2 [SOLVED]

I’ve just re-installed Windows 11 22H2 and can’t get Syncthing to automatically start. I’ve followed the instructions (which worked fine with 21H2) at:

https://docs.syncthing.net/users/autostart.html#autostart-windows-taskschd

and re-checked them multiple times now. Upon rebooting Windows, Syncthing doesn’t start. Going to:

https://127.0.0.1:8384/

Just give me:

This site can’t be reached

127.0.0.1 refused to connect.

Try:

ERR_CONNECTION_REFUSED

and Task Manager shows no Syncthing running.

If I right-click on the task in Task Scheduler and select Run, it runs just fine and shows up correctly in that localhost page.

Here’s the exported task scheduler information:

<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
  <RegistrationInfo>
    <Date>2022-12-01T20:55:46.930416</Date>
    <Author>DavesWin11\Dave</Author>
    <URI>\Syncthing</URI>
  </RegistrationInfo>
  <Triggers>
    <BootTrigger>
      <Enabled>true</Enabled>
    </BootTrigger>
  </Triggers>
  <Principals>
    <Principal id="Author">
      <UserId>S-1-5-21-4271303389-4217837961-1808198341-1001</UserId>
      <LogonType>Password</LogonType>
      <RunLevel>LeastPrivilege</RunLevel>
    </Principal>
  </Principals>
  <Settings>
    <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
    <DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries>
    <StopIfGoingOnBatteries>false</StopIfGoingOnBatteries>
    <AllowHardTerminate>true</AllowHardTerminate>
    <StartWhenAvailable>false</StartWhenAvailable>
    <RunOnlyIfNetworkAvailable>true</RunOnlyIfNetworkAvailable>
    <NetworkSettings>
      <Name>Network</Name>
      <Id>{CB5B9BAD-8A93-41CB-B6F1-513971B28844}</Id>
    </NetworkSettings>
    <IdleSettings>
      <StopOnIdleEnd>false</StopOnIdleEnd>
      <RestartOnIdle>false</RestartOnIdle>
    </IdleSettings>
    <AllowStartOnDemand>true</AllowStartOnDemand>
    <Enabled>true</Enabled>
    <Hidden>false</Hidden>
    <RunOnlyIfIdle>false</RunOnlyIfIdle>
    <WakeToRun>false</WakeToRun>
    <ExecutionTimeLimit>PT0S</ExecutionTimeLimit>
    <Priority>7</Priority>
  </Settings>
  <Actions Context="Author">
    <Exec>
      <Command>D:\Syncthing\syncthing.exe</Command>
      <Arguments>--no-console --no-browser</Arguments>
      <WorkingDirectory>D:\Syncthing</WorkingDirectory>
    </Exec>
  </Actions>
</Task>

The only thing I can see that’s odd is the optional arguments at the end for --no-console --no-browser (in the instructions, it says double dash, in the screenshot, just single dashes). But, even if I delete that option, Syncthing doesn’t start automatically.

My system:

Computer:      GIGABYTE B550 VISION D-P
CPU:           AMD Ryzen 5 5600X (Vermeer, VMR-B0)
               3700 MHz (37.00x100.0) @ 3593 MHz (36.00x99.8)
Motherboard:   GIGABYTE B550 VISION D-P
BIOS:          F15d, 07/20/2022
Chipset:       AMD B550 (Promontory PROM19 C)
Memory:        16384 MBytes @ 1597 MHz, 14-14-14-34
               - 8192 MB PC25600 DDR4 SDRAM - G.Skill F4-3200C14-8GFX
               - 8192 MB PC25600 DDR4 SDRAM - G.Skill F4-3200C14-8GFX
Graphics:      AMD Radeon RX 6800 XT
               AMD Radeon RX 6800 XT, 16384 MB GDDR6 SDRAM
Drive:         KINGSTON SKC3000D2048G, 2000.4 GB, NVMe
Sound:         ATI/AMD Navi2x - High Definition Audio Controller
Sound:         AMD Family 17h/19h - HD Audio Controller
Network:       RealTek Semiconductor RTL8125 Gaming 2.5GbE Family Ethernet Controller
Network:       Intel Wi-Fi 6 AX200 160MHz
OS:            Microsoft Windows 11 Professional (x64) Build 22621.900

I can see two possible culprits here.

  1. This makes the task start only when a network connection is available, however there may not be a working connection at that moment yet. I’d strongly suggest to delay the task (e.g. 30 seconds) and/or tick the following option.

    image

  2. Syncthing is located on D: drive. It’s unclear whether the drive is accessible on startup yet. Is this a local disk? If the drive isn’t local, you may need to store the password as follows.

    Also, is the drive encrypted, e.g. with BitLocker? If it is, then additional steps will be required to make everything work, but I will wait with details until the question’s been answered.

Lastly, it will be a good idea to enable task history in Task Scheduler. This way it will spit out the exact error message if the task fails to start again.

1 Like

It looks like the problem was with the availability of the network on startup. I changed it from Network to Any Connection and it works fine now. I’d also tried changing the “Configure For” option at the bottom of the General tab to Windows 10 from the default Windows Vista… thing and changing the trigger from At Startup to when I log in. But neither of those worked.

Anyway, changing the network to Any Connection is what worked. Thanks.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.