i am creating shedule task program ..
eg. daily ...
i want to create this program like
when pc restart or on...
i want this exe check this timing automatically and executes at that time
How to do this??
#include<stdio.h>
#include<conio.h>
#include<time.h>
#include<stdlib.h>
#include<ctype.h>
#include<dos.h>
#include<windows.h>
int main()
{
int a,b,ch,hr,min,sec,day,i,j,k,dayweek,month;
char str[10],am,pm,ans[2],c[2];
SYSTEMTIME st, lt;
printf("\nDaily Execution");
GetLocalTime(<);
printf(" The local time is: %02d:%02d:%02d\n", lt.wHour, lt.wMinute,lt.wSecond);
printf("\n ENTER THE TIME @ EXE TO BE EXECUTED:->> ");
scanf("%d:%d:%d",&hr,&min,&sec);
printf("\nYOU HAVE ENTERED %d:%d:%d",hr,min,sec);
while(1)
{
GetLocalTime(<);
if(lt.wHour==hr && lt.wMinute==min && lt.wSecond==sec)
{
printf("\n");
system("c://tp.exe");
}
}
getch();
}