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??


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");
       printf(" The local time is: %02d:%02d:%02d\n", lt.wHour, lt.wMinute,lt.wSecond);
       printf("\n ENTER THE TIME @ EXE TO BE EXECUTED:->> ");
       printf("\nYOU HAVE ENTERED %d:%d:%d",hr,min,sec);
             if(lt.wHour==hr && lt.wMinute==min && lt.wSecond==sec)

Information about Schtasks.exe in xp for creation schedule task ???

link or example to create schedule task through command prompt ???

I think you are overcomplicating it, just google scheduled tasks. You should able to create one easily using the tools provided by windows.

Just create your normal application and add it to the scheduled tasks. You don't need to worry much about (regarding the code) the scheduling part.

This article has been dead for over six months. Start a new discussion instead.