[Feature Request] Periodic Trigger

Talk, speculate, discuss, pontificate. As long as it pertains to Hazel.

Moderators: Mr_Noodle, Moderators

[Feature Request] Periodic Trigger Tue Apr 01, 2025 7:19 am • by theworldorder
Besides all nice triggers that Hazel has, I am missing one very specific: periodic trigger. For example:

In Folder Y ... every X minutes/hours/ ... run ...

As far as I know just Keyboard Maestro has this kind of trigger, but for sure I will not buy Keyboard Maestro just for this. So, I would like to suggest that Hazel add this trigger (Hazel already has time trigger, but I do not want to add one entry for every 5 minutes of the day).

My user case: I have some stuff (text files: '.json, .md, .txt, .csv; etc') that I generate directly on my iCloud (by Ipad, MacOS) and I want to synchronize these folders with my backup. Also, I write a lot of scripts that generate data from these files, so I also want to periodically run them (some of these scripts are not instantly, so I can not add a rule like `Content Modified did change`, because it will trigger one script again without complete the former calling. That is why I need a periodically thing).
theworldorder
 
Posts: 4
Joined: Sun Jun 16, 2024 8:13 am

Re: [Feature Request] Periodic Trigger Wed Apr 02, 2025 8:55 am • by Mr_Noodle
Try "Date last matched is not in the last 5 minutes".
Mr_Noodle
Site Admin
 
Posts: 11877
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: [Feature Request] Periodic Trigger Thu May 08, 2025 12:15 pm • by theworldorder
Mr_Noodle wrote:Try "Date last matched is not in the last 5 minutes".


Just an update on this.

I tried this solution, but the problem is that Hazel match all files in the folder. In my case, I had more than 1000 files, so hazel trigged the same script 1000 times in sequence causing a huge mess! (Just saw a lot of windows popping up in my screen).

The solution I found was to create a dummy file with unique name, let's say "hazelrule0000000000.txt" and then put the options:

- Name is 'hazelrule0000000000'
- Extension is '.txt'

These, together with the option "Date last matched is not in the last 5 minutes" ensure that the trigger will be just activated 1 time each 5 minutes, exactly what I need.

Maybe this option (periodic trigger for the whole folder) can be put directly in a future update. Anyway, the above solution works very well.
theworldorder
 
Posts: 4
Joined: Sun Jun 16, 2024 8:13 am

Re: [Feature Request] Periodic Trigger Fri May 09, 2025 10:20 am • by Mr_Noodle
The point is that you pair that with other conditions to match the specific files you want to process.
Mr_Noodle
Site Admin
 
Posts: 11877
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Open Discussion