Andre Ahmed
Andre Ahmed

Reputation: 1891

Task Scheduler API using QT

I'd like to Implement a task scheduler based on a periodic date, Is there a way to implement it using an API by QT ? Another Question , Should I specify the username and the password of the current user of the windows ?

Upvotes: 2

Views: 2662

Answers (1)

shoosh
shoosh

Reputation: 78934

If you want to use the windows task scheduler you'll need to use the COM API for that - http://msdn.microsoft.com/en-us/library/aa383614%28v=vs.85%29.aspx

Qt does not provide a generic API for task scheduling because this kind of thing is usually vastly different in different platforms (Windows task scheduler VS cron on unix) and some platforms (mobile?) probably don't even have an equivalent.

Another option is to pull your own task scheduling by making a process that runs all the time on the background. One option for this is just a regular window-less process that starts on login and another is a windows service which, again, requires some usage of the native API for much the same reasons. Be mindful that a stand alone process that runs all the time is usually frowned upon by users and some of them are likely to just kill your process or disable the whichever mechanism you use to start it up upon login. Scheduled tasks are more obscure and are less likely to be disabled by the user.

Upvotes: 1

Related Questions