# Windows one direction one shot syncing task scheduler

**URL:** https://forum.syncthing.net/t/windows-one-direction-one-shot-syncing-task-scheduler/16444
**Category:** Support
**Created:** [March 4, 2021, 3:53am UTC](https://forum.syncthing.net/t/windows-one-direction-one-shot-syncing-task-scheduler/16444 "2021-03-04T03:53:37Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![tomasz86](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/t/96bed5/32.png) [@tomasz86](https://forum.syncthing.net/u/tomasz86)
#### Post date: [March 4, 2021, 9:10am UTC](https://forum.syncthing.net/t/windows-one-direction-one-shot-syncing-task-scheduler/16444/4 "2021-03-04T09:10:17Z")

</div>

I don’t use Syncthing like that, but the concept is interesting. This looks like what @Catfriend1 has been doing in his Syncthing Fork for Android.

I assume that `curl` is a 3rd party utility here, right? You could use PowerShell (see [https://forum.syncthing.net/t/how-to-call-the-rest-api-from-windows-powershell/11269](https://forum.syncthing.net/t/how-to-call-the-rest-api-from-windows-powershell/11269)) to query the REST API instead to make the script more universal and not rely on any external tools.

> [@GPz1100](#):
>
> If output is pong, then exit, otherwise kill and restart the process.

How are you going to kill the process? I only want to warn that it is impossible with `taskkill` without the `/f` switch, which I would not recommend, as it is a very brute-force solution and may lead to issues.

Killing the Task Scheduler task itself also doesn’t work, because it only kills the parent process, while the child process persists (see [https://github.com/syncthing/syncthing/issues/7042](https://github.com/syncthing/syncthing/issues/7042)).

---

_[View the full topic](https://forum.syncthing.net/t/windows-one-direction-one-shot-syncing-task-scheduler/16444)._
