Can a rule action pause Hazel for a few seconds?

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

Moderator: Mr_Noodle

Is there a way within a rule to get Hazel to wait a number of seconds before continuing to process any more rules in a folder (or even system wide if necessary)?

I've managed to automate the process of emailing invoices out in a robust way where there is no possibility of automatically emailing to the wrong customer.

Hazel wants to process all these PDFs and send all the emails at once and my mailserver is having a difficult time sending 20 or 30 emails out simultaneously.

I'd like to do the following for a folder of PDF documents:

1/ Rules to 1st PDF in the folder are met so run script to email it & then move it
2/ Don't process any more rules for X seconds to allow that to complete
3/ Rules to 2nd PDF are met so run script to email it & then move it
and so on.

Is this possible?

Thanks,
Mark.
MacOCD
 
Posts: 44
Joined: Fri Sep 26, 2014 11:02 am

You can do "Run shellscript" with a script like:
Code: Select all
sleep 5

where 5 is the number of seconds, which you can adjust as necessary.
Mr_Noodle
Site Admin
 
Posts: 11250
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Each customer has a separate rule for the sending of their invoice.

This is because the script to email it is often slightly different customer to customer.

Some sent to a single email address, some to more than 1, some marked for specific person’s attention etc.

Sleep will pause the rule that has just emailed an invoice, but I want to prevent the other rules from emailing for a few seconds.

Any ideas?

Thanks
MacOCD
 
Posts: 44
Joined: Fri Sep 26, 2014 11:02 am

If they are all in the same ruleset, it won't matter. Files are processed sequentially so another file won't be processed until the previous one is finished.
Mr_Noodle
Site Admin
 
Posts: 11250
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Hopefully be ok.

I’m sending invoices out tomorrow, I have around 15 to go.
I’ll see how it works.

Thanks.
MacOCD
 
Posts: 44
Joined: Fri Sep 26, 2014 11:02 am


Return to Support