title: Autorun python script from python
body: <p>I wrote a python script that downloads a random picture from <a href="http://apod.nasa.gov/apod/astropix.html" rel="nofollow">APOD</a>. I want to be able to specify the update frequency in python and have python automatically run the script. So the program would look something like this:</p>
  
  <pre><code>//first setup
  print "how often should the background change in hours?"
  updatefrequency = input()
  schedule_autorun(updatefrequency)
  //run each time
  runprogram()
  </code></pre>
  
  <p>I've seen that people have used the windows task scheduler to auto run the program, but I would like to set it from python. I am running python 2.7 on Windows 7</p>