How can I make a program automatically run once per day?

Paul Rudin paul.nospam at rudin.co.uk
Sun Jul 10 12:21:40 CEST 2011


John Salerno <johnjsal at gmail.com> writes:

> I have a script that does some stuff that I want to run every day for
> maybe a week, or a month. So far I've been good about running it every
> night, but is there some way (using Python, of course) that I can make
> it automatically run at a set time each night?

Well - you can make a long lived python process that puts itself to
sleep for 24 hours and then wakes up and does stuff, but the normal
approach to this kind of thing is to use cron. On windows there's also
some kind of scheduler.




More information about the Python-list mailing list