Windows XP - cron or scheduler for Python?

Irmen de Jong irmen at
Thu Jun 24 23:09:21 CEST 2004

Tim Golden wrote:

> s.start ()
> while 1:
>   try:
>     try:
>       pass
>     except KeyboardInterrupt:
>       break
>   finally:
>     s.stop ()

That's not a very good way of doing that.
This will eat 100% CPU time, it's a busy wait loop...
You should use time.sleep or something else to avoid
busy waiting.
But since you used the 'regular' Scheduler class from
Kronos, it will loop inside the s.start() by itself ... ;-)


More information about the Python-list mailing list