[Tutor] Triggering code on 1 minute intervale ..

Alan Gauld alan.gauld at btinternet.com
Sun May 10 10:01:30 CEST 2009


"Alex Feddor" <alex.feddor at gmail.com> wrote

> .. What will be the best solution to trigger python code every minute as
> soon as PC in on.

This depends on your OS. If its Linux/MacOs then cron might be the best 
bet.
If its Windows you can use scheduled tasks to do it, or the at command.

Or youcould write a python script that runs in the background
(a service or daemon) and launces a thread at periodic intrevals.

But I'd go with cron/at as the simplest solution.


-- 
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/ 




More information about the Tutor mailing list