Schedule management optimizer
There is lots of literature on scheduling, as it is a very important topic. You'd need to make your problem more precise, in particular define your objective and any restictions on the tasks. Note that most such problems are NP complete (no efficient solution likely).

I'd guess that some sort of brute force search is possible, or some sort of dynamic programming solution (but it seems that the restricted subproblems arising are different).