title: Python: How to automate script to run every day at specific time?
body: <p>Currently, I have a python script that only starts once it hits the specified date/time, and never runs again unless I re-specify the date/time:</p>
  
  <pre><code>import datetime, time
  
  start_time = datetime.datetime(2017, 4, 27, 19, 0, 0)
  
  while(True):
      dtn = datetime.datetime.now()
  
      if dtn &gt;= start_time:
         # Runs the main code once it hits the start_time
  </code></pre>
  
  <p>But how can I go about making it so that it only runs the code at a specified time, everyday?</p>
  
  <p>Thank you in advance and will be sure to upvote/accept answer</p>