Help With Current Time

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

Moderator: Mr_Noodle

Help With Current Time Thu Apr 16, 2015 11:43 pm • by radiofreebk
I'm a total noob, so forgive is the answer is obvious, but I've searched the forum and troubleshooting guide and kind find the answers I need.

I'm helping to set up an online radio station, and we're trying to figure out a way to "bank" or queue their shows for broadcast. What I'd like to have happen is that 1. DJs add their files to the queue folder 2. Hazel checks the folder before airtime and moves the least recent, or oldest one (which is the one that should air next) into another directory called "latest" (the "live" queue), renaming it to 'latest.mp3' and replacing the last file. This is so I can have a static rule that the radio scheduling software executes to always play "latest.mp3" at their air time.

Hazel executes the rules correctly, the problem is that after it runs the rule on the first file, it then does it to the second file, and so on. Each replacing the last in the "latest" folder. I figured maybe this was because after it ran rules on the first file, it was STILL 10:20 pm, so it went ahead and kept executing on the files.

To get around this, I tried devising a rule that put all but the least recent into a "Hold" folder at 10:20. The next rule, set for 10:21, put the remaining (least recent) file into the live queue ("latest"). At 10:22, all the files in "Hold" are placed back into the Queue folder.

However, the first rule (that was supposed to only happen at 10:20, still executes when the file is put back, even though it's now 10:22.

The final thing I tries was to create one last rule that said "if it's after 10:20" then 'ignore'. Didn't work.

Can someone please let me know what I'm doing wrong? Is what I'm trying to do impossible? Is there something embarrassingly easy that I've overlooked? Would love some help on this. Thanks.
radiofreebk
 
Posts: 6
Joined: Thu Apr 16, 2015 11:26 pm

Re: Help With Current Time Fri Apr 17, 2015 1:13 pm • by Mr_Noodle
When you use Current time, there's a window of time of a few minutes where it will still match to compensate for times when maybe Hazel is lagged/busy. You can try playing with something like "Date added is not in the last X minutes" or "Date last matched is not in the last X minutes". Give that a shot and report back if it doesn't work out.
Mr_Noodle
Site Admin
 
Posts: 11867
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Help With Current Time Thu Apr 23, 2015 6:33 pm • by radiofreebk
No, I appreciate the suggestion but that didn't really work either. What I need is something that will allow me to execute a rule on a single file in a folder, and then STOP until the next time a rule is scheduled to run. With everything I've tried, the rules just keep executing on each file until the folder is empty.

I get that that's what Hazel is *supposed* to do, so I'm not sure that it's possible to do with Hazel, but if it helps, this is what I need the experience to be for our Hosts/DJs:

1. They place a number of files into a queue folder.

2. Hazel runs a rule 3 hours before their show to determine which show should air next (currently this is by creation date, but could be by anything, like a naming convention or whatever, and then moves that file into the broadcast folder.

3. The rest of the files remain in the queue until the next time the rule is run

I'm going to continue experimenting, but if you have any other suggestions, please let me know. Thanks!
radiofreebk
 
Posts: 6
Joined: Thu Apr 16, 2015 11:26 pm

Re: Help With Current Time Fri Apr 24, 2015 1:27 am • by radiofreebk
ok, i figured out a way to do it. I figured when i moved the file, it was just acting on the next (least recent) since it was all based on time. so the trick was to base it on time, but to then leave it in the folder, which I did by having it change the extension. so the steps are:

1. At a given time, find the least recent mp3 in the queue folder and rename it to [name].txt

2. Five minutes later, look for a file w/extension txt and move it to the broadcast queue

3. broadcast queue folder action -> change the name to latest.mp3

It's clunky and inelegant but it works.
radiofreebk
 
Posts: 6
Joined: Thu Apr 16, 2015 11:26 pm

Re: Help With Current Time Fri Apr 24, 2015 10:21 am • by Mr_Noodle
It's a side effect of constantly moving the most "whatever" file since that always promotes a new file to replace it in that spot. If you can mandate a minimum number of files you can instead use "not 5 of the X most/least <something>".
Mr_Noodle
Site Admin
 
Posts: 11867
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Help With Current Time Fri Apr 24, 2015 11:29 am • by radiofreebk
yep, I get why it happens, but glad I figured out a workaround (I've since changed 'changing the ext' to simply applying a label. Anyway, I think a really useful feature would be "stop" action that could be applied after the previous actions were applied once. Thanks for your help, much appreciated.
radiofreebk
 
Posts: 6
Joined: Thu Apr 16, 2015 11:26 pm

Re: Help With Current Time Sun May 03, 2015 3:28 pm • by radiofreebk
One final question re: current time

I'm trying to set up so that the rules on a particular folder will commence on a certain date and continue thereafter.
Since there is a "current time" but not a "current date," I set the current time for "after 12:00 AM on May 14th". However, it occured to me that this is ambiguous. It could mean any time after midnight on May 14th, (i.e. at 2pm on the 15th) OR it could mean any time after midnight, but only on May 14th (i.e. the rule wouldn't run on the 15th.)

Can you let me know which is the correct interpretation. If it's the second, is there a way I can do it so that the rules start running at this date? I don't want to use "date added" because people will be adding stuff to these folders at varying times. Thanks.
radiofreebk
 
Posts: 6
Joined: Thu Apr 16, 2015 11:26 pm

Re: Help With Current Time Mon May 04, 2015 12:21 pm • by Mr_Noodle
It's any time after midnight on May 14th. Once it becomes May 15th, the condition no longer holds. BTW, is this May 14th, 2015, or do you want the rule to stop running, say, on Jan 1 of next year and start again on May 14th? If it's the former, then it can't really be done since there's no way of specifying the year. If the latter, then you might have to use multiple conditions. Like specify all the months after May, then for May, specifying the days from the 14th onwards.
Mr_Noodle
Site Admin
 
Posts: 11867
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Help With Current Time Mon May 04, 2015 2:39 pm • by radiofreebk
I want it to run any time after midnight on May 14th, but not on specific days, only when files are added to the folder. Right now it's preventing the rules from executing, and I suppose I could go in on the 14th and just remove that condition, but I would rather the other rules just start running on the 14th (there's no end date, they should run indefinitely) without me doing anything further.
radiofreebk
 
Posts: 6
Joined: Thu Apr 16, 2015 11:26 pm

Re: Help With Current Time Tue May 05, 2015 10:47 am • by Mr_Noodle
At some point, you will have to remove the condition since, as mentioned earlier, it will just repeat next year. If set up properly, though it should work for now if you want to give yourself more time before you have to remove it.
Mr_Noodle
Site Admin
 
Posts: 11867
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support