Page 1 of 1

Run a paused rule from Spotlight Search, Alfred or terminal?

PostPosted: Thu Mar 25, 2021 10:19 am
by MortenBrun
Hi

How do I execute a paused rule from outside of the interface?

Best regards,
Morten

Re: Run a paused rule from Spotlight Search, Alfred or termi

PostPosted: Fri Mar 26, 2021 9:36 am
by Mr_Noodle
Can you describe more specifically what you are trying to do? Hazel rules are not meant to be run by manual triggers nor are they meant to be run individually.

Re: Run a paused rule from Spotlight Search, Alfred or termi

PostPosted: Fri Mar 26, 2021 9:45 am
by MortenBrun
I have a rule which is paused, as I only want to execute the rule when a VPN connection is up and running on a NAS server or when I find it necessary. Hope that this clarifies the situation and therefore it would be nice to execute the rule from Spotlight or Alfred.

Re: Run a paused rule from Spotlight Search, Alfred or termi

PostPosted: Mon Mar 29, 2021 10:13 am
by Mr_Noodle
In that case, the best solution (though not easiest), would be a shellscript condition which can detect whether the VPN is up or not. Or you can try and detect a tag which you set on a file whenever you want the rule to run.

Re: Run a paused rule from Spotlight Search, Alfred or termi

PostPosted: Mon Mar 29, 2021 11:22 am
by MortenBrun
Thanks your response.
Unfortunately that makes things a little more complicated than necessary. I only thought that there was a programable interface into Hazel.

Take care.

Best regards,
Morten