Results 1 to 3 of 3

Thread: Scheduling

  1. #1
    Join Date
    Mar 2006
    Posts
    140
    Thanks
    8
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Scheduling

    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

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Scheduling

    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).

  3. #3
    Join Date
    Feb 2011
    Location
    Bangalore
    Posts
    207
    Thanks
    20
    Thanked 28 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Scheduling

    Hi wysota,
    Any success with the cron implementation?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.