With one worker, who can only perform one task at a time (but can switch between tasks instantly)
Given a list of tasks,
-- defined as "n seconds, every m seconds" (eg, 5 seconds every 3600 seconds)
How could I find the best starting times and count for each task?
If every task were "1 second, every 60 seconds", each would have an unique starting second, and the count would be infinite (steady state).
If it was "1 second every 4 seconds" and "1 second every 3 seconds", the result would be: " 0, infinite and 3, 3 times"
-- Hopefully simplest form
If already I have a list of tasks, elaborated with "start second and number of times", what would a function that returns: {start, count} for an additional {n seconds every m seconds} task look like?
--
(Slightly more complex form --
if instead of "n seconds every m seconds",
the tasks were defined as "n seconds every l..o seconds",
where I could pick a number m in the range l - o (but would have to commit to that m until the task was finished),
would that allow better worker utilization?
How would I choose the best 'm' ?