title: Running a python script at various intervals during the day?
body: <p>I need to run a python script at various times depending on the day. The requires are:</p>
  
  <p><strong>On Weekdays:</strong></p>
  
  <ul>
  <li><p>Start 7 am - End 12 pm => run script every 5 minutes</p></li>
  <li><p>Start 12:00 pm - End 4 pm => run script every 30 minutes</p></li>
  <li><p>Start 4 pm - End 9 pm => run script every 5 minutes</p></li>
  <li><p>Start 9 pm - End 7 am => run script every hour</p></li>
  </ul>
  
  <p><strong>On Weekends:</strong></p>
  
  <ul>
  <li>Run script every half hour</li>
  </ul>
  
  <p>I've done some simple cron stuff before, but it doesn't seem like cron can handle this kind of granularity. </p>
  
  <p>I've thought about creating a bash script where it would check the time and run the python script if conditions are met, but I run into problems of how to persist time through each run of the bash script.</p>