Short version of my question: Is there a way to force Hazel to re-run a rule on a file that it's already matched?
Long version:
I use Hazel with HandBrakeCLI to convert downloaded movies and import them to iTunes. Left to its own devices, HandBrakeCLI takes all the available CPU, so I use a program called cputhrottle to limit the amount of cpu HandBrakeCLI can get. For cputhrottle to work properly, I only want one instance of HandBrakeCLI running at a time—so I effectively have to queue my movie downloads.
To make this work, I'm using Hazel to run an AppleScript that does the following:
if HandBrakeCLI is not running:
run HandBrakeCLI on this file;
else:
change the file's color label to green.
EDIT: I should add that I'm running HandBrakeCLI in the background, by appending " &" to the shell command, to allow Hazel to continue processing other files in my Downloads folder while HandBrakeCLI is running.
The script works as described. Then Hazel matches the file with an "if label is green" rule and runs the script again. But if HandBrakeCLI is still running, Hazel won't match the file a third time, so it just sits around, greenly, waiting to be converted.
Is there a way to force Hazel to keep matching a file? Or Can anyone think of a better approach for my problem?