[Tutor] schedulers

Steven D'Aprano steve at pearwood.info
Thu Feb 28 18:19:20 EST 2019


Sorry, I hit send too quick...

I realise you haven't written a busy loop, but the way you wrote your 
scheduler, you can only schedule jobs to the nearest 5 seconds. That's 
probably okay for a backup process that might take a few hours to run, 
but it is hardly a good solution to things that might need to be 
schedules 1 or 2 seconds apart.

And while you aren't *continuously* checking the time, you're still 
checking it pretty often. In the course of a day, you check the 
time 17280 times to see if you should run your backup program. That's 
pretty busy for something running once a day :-)

There's also the problem that you have to remember to launch your 
scheduler program every time you log in. Again, registering your backup 
program with the OS once means you don't have to think about it.

-- 
Steven


More information about the Tutor mailing list