使用QT任务计划程序API [英] Task Scheduler API using QT

查看:912
本文介绍了使用QT任务计划程序API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想实现基于周期性日期任务调度,有没有一种方法来实现它利用QT的API?
另外一个问题,我应该指定的用户名和窗口的当前用户的密码?

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 ?

推荐答案

如果你想使用Windows任务调度程序,您需要使用COM API为 - 的 http://msdn.microsoft.com/en-us/library/aa383614%28v=vs.85 %29.aspx

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不提供任务调度的通用API,因为这种事情通常是在不同的平台(Windows任务调度VS UNIX上的cron)和一些平台上完全不同(移动?)可能甚至不具备同等。

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.

另一种选择是通过使运行所有的背景时的过程来拉自己的任务的调度。这其中的一个选项是只是一个普通的窗口少的过程,开始于登录和另一种是窗口服务这又需要多少相同的原因本机API的一些使用。
要留意的运行所有的时间都经用户通常眉头一皱,有些人可能只是杀了你的过程或禁止使用启动它在登录的任何机构独立的过程。计划任务都比较模糊,不太可能被用户关闭。

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.

这篇关于使用QT任务计划程序API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆