<分区>
我需要编写一个将安装在 windows7 嵌入式企业操作系统中的应用程序。该应用程序的工作是每天在预先配置的时间重新启动另一个应用程序。您能告诉我为此目的我需要引用哪些 API 吗?我需要依赖 Windows 调度程序来完成这项任务吗?是否可以从 win32 代码配置调度程序?
市场上是否已有此职位的应用?
谢谢, 约翰。
<分区>
我需要编写一个将安装在 windows7 嵌入式企业操作系统中的应用程序。该应用程序的工作是每天在预先配置的时间重新启动另一个应用程序。您能告诉我为此目的我需要引用哪些 API 吗?我需要依赖 Windows 调度程序来完成这项任务吗?是否可以从 win32 代码配置调度程序?
市场上是否已有此职位的应用?
谢谢, 约翰。
最佳答案
我会使用一个 Task Scheduler,它有很好的文档记录并且有很多示例。 看看Time Trigger Example :
This C++ example shows how to create a task that is scheduled to execute Notepad at a specified time. The task contains a time-based trigger that specifies a start boundary and an end boundary for the task. The task also contains an action that specifies the task to execute Notepad. The task is registered using an interactive logon type, which means the task runs under the security context of the user who runs the application. The task also contains idle settings, which specifies how Task Scheduler performs tasks when the computer is in an idle condition.
关于c++ - 开发一个应用程序以重启另一个应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26036697/