我写了一个从APOD下载随机图片的 python 脚本。我希望能够在 python 中指定更新频率并让 python 自动运行脚本。所以程序看起来像这样:
//first setup
print "how often should the background change in hours?"
updatefrequency = input()
schedule_autorun(updatefrequency)
//run each time
runprogram()
我已经看到人们使用 windows 任务调度程序来自动运行程序,但我想从 python 设置它。我在 Windows 7 上运行 python 2.7