Is it safe to schedule a "occ files:scan --all" and access or upload files?

I originally posted to Reddit https://www.reddit.com/r/NextCloud/comments/bl1bv8/is_it_safe_to_schedule_a_occ_filesscan_all_and/ But I might get an answer here faster.

I’m finding that sometimes Nextcloud fails to notice file system changes even with “‘filesystem_check_changes’ => 1,” in my config.php settings. I’m looking around and I’m seeing online suggestions to run “occ files:scan --all” or “occ files:scan --unscanned --all” as a cron scheduled task.

Question is if I set one of those above and it happens to run as I’m uploading or accessing files, will there be any issue? Is it safe to access, upload, or modify files while a scan is in progress?

It is 100% safe if you use webUI, NC Client or Webdav.

If you do this directly via filesystem - have no idea, but should be ok. In a worst case directly uploaded file fill not appears in NC till next file scan. Only in external storages NC will read FS when accessing the folder. You can also schedule this scan: https://docs.nextcloud.com/server/15/admin_manual/configuration_files/external_storage_configuration_gui.html#adding-files-to-external-storages

I used this script for me, to rescan only external storages: