PDA

View Full Version : Cron or Quartz-like event scheduling?



davelowndes
15th August 2010, 21:42
Hi,

I need to create event schedules programmed like cron or quartz-scheduler (http://www.quartz-scheduler.org/) (every 30mins, or every Tuesday at 1pm, etc.). The schedule needs to persist whether the app is running or not and the app needs to react to these events when it is active.

Is there any popular framework for this in Qt/C++? I see mention of a Calendar API in the roadmap but only find information about the Calendar widget.

Cheers!

The Storm
15th August 2010, 21:46
Well why you would need a special framework for a scheduler? I think you can just use a 1 second timer for example to check if it is time to run specific task.

davelowndes
15th August 2010, 22:16
I don't think QTimer is tied to the system clock? I.e. start event at 06:00.000.

Also I'd rather not code all the complex rules and tests for every 2nd Tuesday at 8pm, every first Thursday in the month, etc. I'd rather have a library to do this so I can carry on and code the business logic.

The Storm
15th August 2010, 22:22
QTimer is not tied to the system clock but you can check the clock when your timer calls a slot.

I don't think that library of your request exist. I mean that this is complete product you can hardly call it library if it can do all the scheduling. So if you like to add some business logic( I can't imagine what this would be ) just get some of the already created open source projects and write some new stuff. :)