PDA

View Full Version : Scheduling



stevey
18th April 2008, 11:02
I need to create a scheduler, something similar to that in uTorrent / Azureus to provide the user the ability to run processes at a specifiied times.
I'm just after the concept and which classes to consider, not an implementation as such.

I was thinking of setting a QTimer with a timeout to fire every 30 seconds or so, then check the time, but is there a neater way of doing it to actually respond to an OS timer event that may exist?


Thanks,

Stevey

wysota
19th April 2008, 13:03
I'm working on a cron implementation in Qt. The natural choice is to use QTimer with a timeout set to the quantum you need to be able to run tasks - in case of cron it is one minute. As a replacement for QTimer you can use QObject::timerEvent(). The two work exactly the same way (actually QTimer uses timer events to do its job).

pkj
18th June 2011, 06:31
Hi wysota,
Any success with the cron implementation?