How to force Hazel reprocess files

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

Moderator: Mr_Noodle

How to force Hazel reprocess files Thu Feb 04, 2010 3:08 pm • by Emanu
Hello there,

I use Hazel for an automatization workflow and it works quite well but I still have the following problem.

Let met explain.

I have FolderA which contains XML files that are imported in InDesign via AppleScript and coupled with a template, then, processed to produce InDesign files of 'indd' type which are saved in FolderB while the XML files are moved (via AppleScript) to FolderC.

Depending of the Mac (mine or the client) this takes about 10 to 20 seconds for each files.

Hazel is monitoring FolderA, and when it sees a new XML file it applies this rule:
Date Added is in the last 1 hour
and then launch an AppleScript that will import the XML file as described above. When InDesign have finished to generate the indd file, the AppleScript will move the XML file to FolderC.

When, for testing I drop 5 to 10 files, usually everything will go fine. But then, If I drop about 20 to 30 files at once, Hazel will "forget" to process some of the files. So these files will stay in FolderA forever without have been imported in InDesign via AppleScript.

My guess, and I have to check more the Hazel log, is that these files are processes by Hazel, but with this amount of files, the AppleScript/InDesign somehow are timing out.

So, to make a story short, how can I force Hazel to reprocessed files that has been seen before by Hazel. Something comparable to a loop like this:

while number of files in FolderA > 0 {
Hazel apply rule
}

Hope this make sense.

TIA

Cheers
-Emmanuel
Emanu
 
Posts: 4
Joined: Thu Feb 04, 2010 2:09 pm

Re: How to force Hazel reprocess files Fri Feb 05, 2010 12:08 pm • by Mr_Noodle
If the AppleScript is failing, Hazel should be re-running the rule until it successfully completes. Check the logs to see if that is the case. If you are unsure, email me the logs.
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: How to force Hazel reprocess files Fri Feb 05, 2010 12:19 pm • by Emanu
Well I resolved my problem by including a big timeout in the AppleScript and now everything work fine.

Let me tell you btw how much I appreciate Hazel and I have built a workflow for InDesign for a big company around it.

Cheers
-Emmanuel
Emanu
 
Posts: 4
Joined: Thu Feb 04, 2010 2:09 pm


Return to Support