There are a bunch of apps, both community submitted and native that have the notion of restricting the app to running only during certain times. In some cases, I feel like I’ve seen that both fields are optional, but I’m wondering if that makes sense.
For example, can you really have a starting time of say 5p.m. and no ending time? If so, well then technically it’s ALWAYS after 5p.m., maybe the next day, but it’s still technically after 5p.m. Same argument can be made for ending time.
If on the other hand you believe that you CAN have a start without an end (or vice versa), then you are implicitly saying that the missing start/end time is midnight, are you not? I could buy this argument, but I just wonder if it’s better to require neither or both.
On a related note, for these types of apps that are time restricted and/or have some other conditions e.g. mode restrictions, do you all think it’s better practice to run periodically (say once an hour), and each time just check all your conditions (mode, time of day, etc.) or to programmatically determine the next earliest run time for the app based on start time and any other conditions like day of week?
My feeling is that, while a little more complicated, the latter is a better approach because it’s less resource intensive. For example, why check once an hour for a condition that you KNOW will only be satisfied 4 hours a day? I’d say it’s better to schedule the app to run at the next earliest time and then check the mode and/or other conditions.
Just thought it’d be interesting to start a dialogue and see what everyone thought.