Rule not running on file modification

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Rule not running on file modification Thu Jul 10, 2025 4:23 am • by metaning
I'm trying to get Hazel to back up a file to another directory whenever that file is modified.

The rules are:

If ALL:
- Extension | is | .dnl
- Date Last Modified | is in the last | 5 | minutes

Do the following:
- Copy | to folder (my folder choice) | Options: Replace the existing file

If I do something in the app using this file, I can see the .dnl file's modified date is changed in Finder's get info, and I can see Hazel's log then runs this:

Code: Select all
2025-07-10 17:45:38.148 hazelworker[67864] Running worker (v5.3.4) for folder with identifier: 16777231-19563.
2025-07-10 17:45:38.149 hazelworker[67864] ###Arch: x86_64
2025-07-10 17:45:38.149 hazelworker[67864] ###main load address: 0x10091c000
2025-07-10 17:45:38.149 hazelworker[67864] ###Hazel Core load address: 0x100b2c000
2025-07-10 17:45:38.149 hazelworker[67864] ###Noodle load address: 0x100e34000
2025-07-10 17:45:38.149 hazelworker[67864] ###CK load address: 0x100a1a000
2025-07-10 17:45:38.165 hazelworker[67864] Processing folder Doughnut
2025-07-10 17:45:40.248 hazelworker[67864] Done processing folder Doughnut


But the file isn't moved, and it will stay unmoved until the rule passes the 5 minute timeout and the rule preview puts a red fail on the timing condition.

If I change something in the file again, and manually run the rule, it copies the file (and moves the old one to the trash if there's one there - an option to overwrite in place would be nice).

You can see in this log it appears to run, and do nothing immediately upon changing the file, then runs again when I manually run the rule, and copies the file.

Code: Select all
2025-07-10 18:16:02.050 hazelworker[68558] Running worker (v5.3.4) for folder with identifier: 16777231-19563.
2025-07-10 18:16:02.052 hazelworker[68558] ###Arch: x86_64
2025-07-10 18:16:02.052 hazelworker[68558] ###main load address: 0x10af2c000
2025-07-10 18:16:02.052 hazelworker[68558] ###Hazel Core load address: 0x10b13c000
2025-07-10 18:16:02.052 hazelworker[68558] ###Noodle load address: 0x10b444000
2025-07-10 18:16:02.052 hazelworker[68558] ###CK load address: 0x10b02a000
2025-07-10 18:16:02.069 hazelworker[68558] Processing folder Doughnut
2025-07-10 18:16:04.153 hazelworker[68558] Done processing folder Doughnut
2025-07-10 18:16:10.225 hazelworker[68559] Running worker (v5.3.4) for folder with identifier: 16777231-19563.
2025-07-10 18:16:10.226 hazelworker[68559] ###Arch: x86_64
2025-07-10 18:16:10.226 hazelworker[68559] ###main load address: 0x1055cc000
2025-07-10 18:16:10.226 hazelworker[68559] ###Hazel Core load address: 0x1057dc000
2025-07-10 18:16:10.227 hazelworker[68559] ###Noodle load address: 0x105ae4000
2025-07-10 18:16:10.227 hazelworker[68559] ###CK load address: 0x1056ca000
2025-07-10 18:16:10.243 hazelworker[68559] Processing folder Doughnut (forced)
2025-07-10 18:16:12.321 hazelworker[68559] Doughnut Library.dnl: Rule Library file Archiver matched.
2025-07-10 18:16:12.321 hazelworker[68559] [File Event] File copied: Doughnut Library.dnl copied from folder /[removed]/Doughnut to folder /[removed]/Doughnut Library Backup.
2025-07-10 18:16:14.418 hazelworker[68559] Done processing folder Doughnut


Am I missing something? My other automatic rules on 5 minute timeouts for files added seem to be working ok.
metaning
 
Posts: 13
Joined: Fri Dec 16, 2022 7:21 am

Re: Rule not running on file modification Thu Jul 10, 2025 5:02 am • by metaning
I changed the Do rule to Sync, which solves the putting copies in the bin issue, but it's still not auto running:

Code: Select all
2025-07-10 18:58:30.218 hazelworker[69594] Running worker (v5.3.4) for folder with identifier: 16777231-19563.
2025-07-10 18:58:30.220 hazelworker[69594] ###Arch: x86_64
2025-07-10 18:58:30.220 hazelworker[69594] ###main load address: 0x100494000
2025-07-10 18:58:30.220 hazelworker[69594] ###Hazel Core load address: 0x1006a4000
2025-07-10 18:58:30.220 hazelworker[69594] ###Noodle load address: 0x1009ac000
2025-07-10 18:58:30.220 hazelworker[69594] ###CK load address: 0x100592000
2025-07-10 18:58:30.236 hazelworker[69594] Processing folder Doughnut
2025-07-10 18:58:32.319 hazelworker[69594] Done processing folder Doughnut


It does the file sync if I manually run the rule, though.
metaning
 
Posts: 13
Joined: Fri Dec 16, 2022 7:21 am

Re: Rule not running on file modification Thu Jul 10, 2025 5:24 am • by metaning
OK, I removed the 5 minute timer, and it worked once, but then stopped working with the same symptoms.

Also, it's filling the bin with the old versions of the file / folder, which isn't really tenable as a solution. Is there any way to get Hazel to just overwrite things in place without putting copies in the trash?
metaning
 
Posts: 13
Joined: Fri Dec 16, 2022 7:21 am

Re: Rule not running on file modification Thu Jul 10, 2025 9:19 am • by Mr_Noodle
Can you go through the troubleshooting guide here? https://www.noodlesoft.com/kb/hazel-tro ... ing-guide/

Please do all tests listed there and report back with the results.
Mr_Noodle
Site Admin
 
Posts: 11945
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support