Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to schedule a task in C++

I have a C++ windows service which should call a function every 15 minutes. I am new to c++ and have no idea how to do this.Can anybody tell me how to achieve this?

Thanks, Subrat

like image 778
subs Avatar asked Dec 18 '25 05:12

subs


1 Answers

Call SetTimer().

Alternately, use the Task Scheduler API, which can execute a regular .exe or COM handler on a predefined schedule. If you do that, you may not even need a service.

like image 96
Nate Avatar answered Dec 20 '25 21:12

Nate