Folder Matching Failure

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

Moderator: Mr_Noodle

Folder Matching Failure Sat Feb 11, 2023 2:42 am • by Pelorus32
I have a rule that monitors a folder hierarchy for changes and if there are changes it kicks off a shell script which runs an rsync command.

The rule has a delay built into it so that when a new file is created it doesn't trigger on the basis of untitled.md for instance, but gives you time to name the file.

If I check whether the rule is matching it matches. If I pick Run Rules Now it runs and does what is expected with the shell script. However if left running it never matches and therefore never runs the script!!

Image

I've wracked my brain trying to work out what's going on...but I'm stumped.

Can anyone give me a pointer?
Pelorus32
 
Posts: 14
Joined: Sat Feb 29, 2020 2:48 am

Re: Folder Matching Failure Tue Feb 14, 2023 10:16 am • by Mr_Noodle
I'm not sure why you have the nested condition there but have you looked at the Sync chapter in the manual? There's a rule there which uses Hazel's Sync action, which is rsync under the hood.
Mr_Noodle
Site Admin
 
Posts: 11250
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Folder Matching Failure Tue Feb 14, 2023 5:48 pm • by Pelorus32
Mr_Noodle wrote:I'm not sure why you have the nested condition there but have you looked at the Sync chapter in the manual? There's a rule there which uses Hazel's Sync action, which is rsync under the hood.


As per my initial post the nested condition is to induce a delay. Otherwise when I created a document in a watched folder I was getting 2 documents created in the Rsync location: untitled.md and mydocument.md for instance. This was because the rule was triggering on creation and then on a change when I named the document a couple of seconds later. I needed enough delay to avoid that happening.

I have reviewed the Sync chapter, prior to writing this rule, the rule leans heavily on what's in that chapter. I'm using Rsync rather than Hazel's Sync capacity so I can use some of the options in Rsync to tailor the result.

None of that however addresses the issue: This rule will match if checked in the Hazel interface; it will run in a forced run in the Hazel interface; but it won't run if left to its own devices to watch the folder. I need help in resolving that please.
Pelorus32
 
Posts: 14
Joined: Sat Feb 29, 2020 2:48 am

Re: Folder Matching Failure Fri Feb 17, 2023 3:33 am • by Pelorus32
Mr_Noodle wrote:I'm not sure why you have the nested condition there but have you looked at the Sync chapter in the manual? There's a rule there which uses Hazel's Sync action, which is rsync under the hood.


I have now deleted and re-written the rule and removed the nested condition entirely. There only remains the matching rule.

The rule will match when forced but will not match when left to watch the folder.

On startup Hazel throws a raft of errors in the logs. Is there a way to send you the logs?
Pelorus32
 
Posts: 14
Joined: Sat Feb 29, 2020 2:48 am

Re: Folder Matching Failure Fri Feb 17, 2023 10:52 am • by Mr_Noodle
You can email them in. Make sure to send a link to this thread for context.
Mr_Noodle
Site Admin
 
Posts: 11250
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Folder Matching Failure Fri Feb 17, 2023 6:49 pm • by Pelorus32
Mr_Noodle wrote:You can email them in. Make sure to send a link to this thread for context.


Done
Pelorus32
 
Posts: 14
Joined: Sat Feb 29, 2020 2:48 am


Return to Support