Hi there,

I have joined this forum to ask lots of programming and hardware relevant questions. Well first one is this....

I am a C++ programmer. But I am trying to develop a program(.exe file) that will automatically run when I want to run it. Like I want to run it 1 am every night. So what is the library function for this and what is is syntax? I am using Turbo C/C++ compiler to write codes.

Please help me anybody.....

7 Years
Discussion Span
Last Post by Caligulaminus

A program cannot start itself. You will need another program to start it for you. If you are using a standard operating system such as a *nix or Windows, a program to do that already exists.

Under *nix, look up "cron". Under Windows, look up "task scheduler". It will be much easier to use an already existing program to do this than write your own.

Alternatively, have your program always running, but just waiting and checking the time every minute or so until it's time to do whatever its task is.

Edited by Moschops: n/a


Okay thanks for ur answer. In fact I was looking for more specific answer. I think using c++ programming language we can write a script and then integrate it with our main exe file. and then this script or exe file can start the main program when any condition fulfill.

Even though I am not 100% sure but can anybody tell me if anything like this exists.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.