Current Time & color label rule set not behaving as expected

I've got a set of rules (and not sure if these can be consolidated into just one rule) that is intended to append a text file at 12:00 AM each day using an embedded shell script. The first rule will set the file's color label to red, then append it using the embedded shell script; once the time passes 12:01 AM, the second rule removes the color label so the appending rule will trigger again the following day.
I am trying to avoid the rule running repeatedly (and repeatedly appending the text file) while the time is still 12:00 AM.
The "red file label" technique in my rules slows down the repeated text appending, but does not eliminate it.


These two rules just repeatedly append the text file until the time is no longer 12:00 AM, and I can see the file in the Finder getting the red label on and off repeatedly during this time.
Here is the script code in case that makes any difference:
My ultimate goal is for the text appending action to be run just once at 12:00 AM. If there is a less convoluted way to make this happen, I'm all for it. But I'm also curious why this setup isn't working.
Oh, and I am on Hazel 3 still since my attempts at upgrading to macOS didn't go well.
I am trying to avoid the rule running repeatedly (and repeatedly appending the text file) while the time is still 12:00 AM.
The "red file label" technique in my rules slows down the repeated text appending, but does not eliminate it.


These two rules just repeatedly append the text file until the time is no longer 12:00 AM, and I can see the file in the Finder getting the red label on and off repeatedly during this time.
Here is the script code in case that makes any difference:
- Code: Select all
DATE_PREPEND=$(date +"%Y-%m-%d")
echo -e "\n# $DATE_PREPEND" >> /Users/George/Dropbox/Notes/_journal.txt
My ultimate goal is for the text appending action to be run just once at 12:00 AM. If there is a less convoluted way to make this happen, I'm all for it. But I'm also curious why this setup isn't working.
Oh, and I am on Hazel 3 still since my attempts at upgrading to macOS didn't go well.