I'm working on some scripts that will be run by a rule like this:
IF
(conditions)
THEN
set label to none
run script
END
All scripts open the file to read its content, and do useful things with the data.
When a script completes, the unlabeled file is either relabeled (with a different label), deleted, or moved elsewhere.
Any uncaught script error will make Hazel run the rule again. This is not useful to me, as the cause of foreseeable errors will not go away with the passing of time. So scripts must catch all errors, and send an email to user to inform them about what happened.
When an error occurred the user should resolve any problem and reset the label, to tell Hazel to run the same script again.
But Help tells me:
If a file matches the same rule it matched last time, it will not re-run its actions
I'm thinking the user could drag the offending file out of its folder, wait a little, then put it back. Hazel will see it as new, and rerun the rule.
Is there any other way? Does 'Run rules now' run actions regardless of the rule having matched previously?
How much time should pass to make Hazel see the file as new? (Make a rule on that other folder to move the file back.)
Note: scripts run on a Mac that's on its own - no user present.
The labels, and the way they change, are an integral part of the workflow. I *have* to use them.