开发者

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 Q开发者_如何学Cuestion , Should I specify the username and the password of the current user of the windows ?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜