Many thx. As a workaround, i have now created 2 systemd units:
Service Unit: nc_scanfolder.service
[Unit]
Description=Starts scanning the folder
After=network.target
[Service]
Type=oneshot
User=www-data
ExecStartPre=/usr/bin/sleep 10
ExecStart=/usr/bin/php /var/www/nextcloud/occ files:scan --path="/username/files/folder"
and Path Unit: nc_scanfolder.path
[Unit]
Description=Checks for changes
[Path]
PathChanged=/mnt/external/storage/folder
Unit=nc_scanfolder.service
TriggerLimitIntervalSec=30
TriggerLimitBurst=1
[Install]
WantedBy=multi-user.target
This works fine so far. If a file changes in this folder, the scan will be initialized. To prevent running the scan to often for to much changes, i have added a delay of 10 seconds in the service unit and a burst limit in the path unit. With this, multiple changes are bundled in 1 scan. At least, its a workaround. I dont know if there are better ways to do this.






Very cool. 25 years ago I had also a lot of aquarium at home. I have started recently to start again with that, but this time with the help of of home-assistant. My main goal is to keep an eye on the water values, because this is the most complicated thing here.
Is there some cheap and simple way to watch water values with home-assistant? Specially nitrate, nitrite pH and so on. I don’t want to deal with this useless color stripes again where I never can distinguish between the colors.