好的,所以我的问题是,我该如何制作一个基本上执行程序其余部分的程序,例如12pm。例如一些非现实的代码:程序在特定时间执行
#include <stdio.h>
#include <time.h>
int main()
{
Get_time() //Gets system time
if(time() == 254pm){ //if time is 2:54pm
printf("Time: 2:54pm\n");
}
else printf("Program can not execute at this time.\n");
return 0;
}
有谁知道我该怎么做类似的事情?
您是否试图重塑['cron'](http://en.wikipedia.org/wiki/Cron)? –
不,只需要我的程序在特定时间执行其余的代码。对于windows。 – shix
或[Windows计划程序](http://support.microsoft.com/kb/308569),因为这具体被标记为'winapi'。 “Scheduler API”记录在[这里](http://msdn.microsoft.com/en-us/library/windows/desktop/aa383608(v = vs.85).aspx) –