How long until Hazel gives up

Talk, speculate, discuss, pontificate. As long as it pertains to Hazel.

Moderators: Mr_Noodle, Moderators

How long until Hazel gives up Wed Oct 12, 2011 4:14 pm • by gregjsmith
I have multiple files in a folder that match to a rule but are not processed by the script in the rule (only one file at a time can be processed). eventually Hazel stops running rules on these files. Preview rules shows these files should be matched and new files are matched and acted upon.
gregjsmith
 
Posts: 10
Joined: Wed Oct 27, 2010 4:49 pm

Re: How long until Hazel gives up Thu Oct 13, 2011 11:05 am • by Mr_Noodle
What do you mean by "not processed"? Does your script return an error status? If it returns 0 (which indicates success), Hazel will have considered that action to have executed successfully.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: How long until Hazel gives up Thu Oct 13, 2011 11:21 am • by gregjsmith
The rule is find a file of a certain extension (of which there are multiple in the folder). If the rule is matched an applescript runs. The script won't do anything if a process is running. Since processing a single file can take a while, hazel should keep trying to match the files and running the applescript on them.

It seems after a while hazel gives up and stops running the rules on the existing files. Instead it will run rules on recently added files. But preview of rules shows that all files in the folder match and if I manually run rules, it will run the rules on all the files.

I see nothing in the logs to indicate that hazel is trying to do anything to the files until I manually run rules then they run successfully.
gregjsmith
 
Posts: 10
Joined: Wed Oct 27, 2010 4:49 pm

Re: How long until Hazel gives up Sun Oct 23, 2011 11:08 am • by teedledee
This happens to me as well. I have two rules running on Desktop, the first renaming screen shots and the second applying a color label. Whichever one is first in the Hazel list gets processed, and the second one is ignored. I make multiple screen shots to test and it keeps happening.

If rename is first, it is run. Second rule (label) is ignored.
If label is first, it is run and rename is ignored.

Is there a way to force it to work?
teedledee
 
Posts: 17
Joined: Mon Jan 24, 2011 12:54 pm

Re: How long until Hazel gives up Mon Oct 24, 2011 10:52 am • by Mr_Noodle
teedledee: In your case, the rule logic needs to be fixed. Only one rule can match and the first one that does is the one that gets run. Also, is there a reason why you are using two rules for this? If you want multiple actions to be applied to the same file, why not just use multiple actions in the rule?


gregjsmith: Sorry to get back to you late on this. If it is an Applescript, unless you throw an error, the script is considered to have run successfully. If you want the rule to be re-run on failure, you need to indicate that failure to Hazel by throwing an error.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Open Discussion