title: Repartition of cron
body: <p>(I apologize in advance for bad formulation of my problem, please consider english is not my first language).</p>
  
  <p>I have several processes (crons) and I want to "optimize" the schedule when to launch them.</p>
  
  <p>For example, cron c1 starts every 3 minutes, cron c1 starts every 7 minutes and cron c3 starts every 18 minutes. Assume they last only a few seconds before stopping.</p>
  
  <p>The unit of time here is 1 minute.</p>
  
  <p>Now, what I want is that these crons are distributed so that we don't have a moment where many of them start and then long time interval with no cron at all. For example, if c1 and c3 both start at time 0, then they will start again together every 18 minutes. It would be better to start cron c1 at time 0 and then c3 at time 1, so that they are never launched together.</p>
  
  <p>So the idea is, given a list of crons with periodicity, to plan a schedule, so that there is as much time between each cron as possible and as few as possible moments when two crons start together.</p>
  
  <p>Are there some well-known algorithms about such problems?</p>
  
  <p>The real-life application of this problem is: ~ 200 crons. Some of them are launched every 5 or ~10 or ~30 minutes and last very short (few seconds), some (~20 - 25) are launched every 2 hours and last a few minutes. So the idea is also that the big crons are not launched at the same time.</p>
  
  <p>I am a mathematician myself and not a computer scientist, so I asked this question on <a href="https://math.stackexchange.com/">https://math.stackexchange.com/</a>, since I consider this being a "nice" question for mathematicians too.</p>