Select tasks within a specific time interval

According to GTD, energy level is one of criteria to select tasks. I use defer time to divide task to 3 sections, 12am - 2pm, 2pm - 8pm, and 8pm - 12am; they correspond to energy level high, energy level medium, and energy level low.

I want to find a script to cycle views among three sections, similar to “Cycle Through Task States” in the page The first state includes all the tasks happening between 12am and 2pm; the second state is between 2pm and 8pm; the third state is between 8pm - 12am.

The alternative solution is to write a script. My difficult part is how to select tasks happening between specific time interval.

Has anybody an idea how to solve that? Any help greatly appreciated!



Thanks for the link. The task- and project-cycling scripts are helpful for learning.

If your time-based system is working for you, don’t change it. However, it sounds confusing to me. If you’ve specified the time window for a certain task from 2pm to 8pm (I assume defer and due times) why would you want to cycle to it throughout the day? If the times are just energy contexts anyway, why not simplify things and simply have three energy contexts? They would be much easier to filter with perspectives. Then you could activate each with a keyboard shortcut, which could further sort the individual tasks by time deferred or due.

Because I want the lists which list the items available to me now. For example, after 2pm, OmniFocus will still show the tasks that should be done before 2pm. However at that time, I do not have enough energy to complete them, then I do not want to see them when doing tasks.