# inotify fix via task scheduler

**URL:** https://forum.syncthing.net/t/inotify-fix-via-task-scheduler/17216
**Category:** Support
**Created:** [August 11, 2021, 11:40pm UTC](https://forum.syncthing.net/t/inotify-fix-via-task-scheduler/17216 "2021-08-11T23:40:37Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Chris.Karst](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/c/ecd19e/32.png) [@Chris.Karst](https://forum.syncthing.net/u/Chris.Karst)
#### Post date: [August 11, 2021, 11:40pm UTC](https://forum.syncthing.net/t/inotify-fix-via-task-scheduler/17216/1 "2021-08-11T23:40:37Z")

</div>

Trying to use the following info:

> [bdlow](https://forum.syncthing.net/u/bdlow)[Ben](https://forum.syncthing.net/u/bdlow)
> 
> [Oct '18](https://forum.syncthing.net/t/setting-inotify-limit-permanently-on-synology-diskstation/12221/4)
> 
> FYI here’s what works on a DS916+ running DSM 6.1.7: go to Control Panel \> Task Scheduler. Create a New Task \> Triggered Task \> User-defined script.
> 
> In General Settings tab: give it a name (e.g. “Syncthing sysctl inotify fix”) and Event = Boot-up.
> 
> In the Task Settings tab: enter this in the Run Command box:
> 
> ```plaintext
> sh -c '(sleep 90 && echo 204800 > /proc/sys/fs/inotify/max_user_watches)&'
> 
> ```
> 
> The sleep is to delay the setting to (hopefully) skip past any initialisation that Synology do at boot. Seems to work for me.
> 
> Click Ok to close the task dialog, then enable the task and hit the Save button.

So I created a scheduled task with the run command of

`sh -c '(sleep 90 && echo 204800 > /proc/sys/fs/inotify/max_user_watches)&'`

The status i get via email is:

> Task Scheduler has completed a triggered task.
> 
> Task: Syncthing inotify fix Start time: Wed, 11 Aug 2021 19:18:13 GMT Stop time: Wed, 11 Aug 2021 19:18:13 GMT Current status: 0 (Normal) Standard output/error:
> 
> From DS220plus

But the inotify error persists.

Does this need tweaked? Perhaps DSM 7.0 made changes to location?

---

<div class="post-metadata">

### Author: ![Chris.Karst](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/c/ecd19e/32.png) [@Chris.Karst](https://forum.syncthing.net/u/Chris.Karst)
#### Post date: [August 12, 2021, 1:01am UTC](https://forum.syncthing.net/t/inotify-fix-via-task-scheduler/17216/2 "2021-08-12T01:01:52Z")

</div>

Error message seems to have finally gone away…

Maybe changing to using the root user vs the administrator level user made the difference?

---

<div class="post-metadata">

### Author: ![AudriusButkevicius](https://forum.syncthing.net/user_avatar/forum.syncthing.net/audriusbutkevicius/32/277_2.png) [@AudriusButkevicius](https://forum.syncthing.net/u/AudriusButkevicius)
#### Post date: [August 12, 2021, 7:22am UTC](https://forum.syncthing.net/t/inotify-fix-via-task-scheduler/17216/3 "2021-08-12T07:22:17Z")

</div>

Tweaking that would only for for root.

---

<div class="post-metadata">

### Author: ![system](https://forum-uploads.syncthingcdn.net/original/2X/0/0b50e0a202b22ae6a67190759e8c868805b8ed9f.png) [@system](https://forum.syncthing.net/u/system)
#### Post date: [September 11, 2021, 7:23am UTC](https://forum.syncthing.net/t/inotify-fix-via-task-scheduler/17216/4 "2021-09-11T07:23:08Z")

</div>

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