| | |
c or c++ program to excute at a specified time
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
0
#4 19 Days Ago
•
•
•
•
???
system() has nothing to do there (it's even prohibited under Windows...)
Just use the scheduler
The poster wanted to ask if he can call exes at given time.
For this the he can write a code to call his exes.
The scheduler does schedule execution of the exes. But what i replied was related to 'through code' .
system() call is very much 'allowed' in Windows(If u meant that the system() call in Win environment is not allowed).
I use Dev-C++ on Win Xp and use the system("PAUSE") call to pause the program just before it passes control to the OS.
system() can certainly invoke exes:
http://www.computing.net/answers/pro...app/16725.html
http://www.cplusplus.com/reference/c...stdlib/system/
Cheers
PEACE !
•
•
Join Date: Jan 2008
Posts: 3,810
Reputation:
Solved Threads: 501
0
#6 19 Days Ago
•
•
•
•
hi guys,
i am ranjith intrested in writing c c++ progs i hav a doubt that can i write a c or c++ program to excute at a given time
thanks
You're going to have to clarify. Do you have some executable program, originally written in C++, that you want to run at, say 2 p.m.? All sorts of languages can be used to cause this to happen, not just C++, and you don't need to write your own. As mentioned, the Operating System can handle this for you with no code written by you (i.e. the scheduler, as mentioned). Or are you trying to write a program in C++ that will run an executable program at a specified time (i.e. are you WRITING a scheduler program in C++)?
•
•
Join Date: Oct 2009
Posts: 15
Reputation:
Solved Threads: 0
0
#8 13 Days Ago
Hello ,Ranjith!
Try This:
I think it should work with you ,Because i tryed it before posting and it worked well...
Regards,,
Kimo.
Try This:
C++ Syntax (Toggle Plain Text)
#include <iostream> // For Simple Input & Output. #include <time.h> // For dealing with time. #include <conio.h> // For getch() function. using namespace std; int main() { struct tm T; _getsystime( &T ); if (T.tm_hour == 12) // If the Time is 12 PM. { cout << "Sorry this programme can't be executed at this time"; getch(); return 0; } else { goto Programme; } Programme: //Your Programme Here }
I think it should work with you ,Because i tryed it before posting and it worked well...
Regards,,
Kimo.
![]() |
Similar Threads
- Visual Basic Timer/Clock/Countdown. (Visual Basic 4 / 5 / 6)
- How to end a program after a certain amount of time? (C++)
- Trying to write to a file so that another program can read from it at the same time (C++)
- how to execute an application/program after a certain amount of time has passed linux (C++)
- How do I find the path of my VB program at run time (Visual Basic 4 / 5 / 6)
- Time Zone Program (Geeks' Lounge)
- how can i make the program depend on time (C)
Other Threads in the C++ Forum
- Previous Thread: Apparent flaws in C++
- Next Thread: Problems with functions
| Thread Tools | Search this Thread |
api array based beginner binary bitmap c++ c/c++ calculator char char* class code coding compile compiler console conversion count database delete deploy desktop developer dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker list loop looping loops map math memory multiple news node number numbertoword output parameter pointer problem program programming project python random read recursion recursive reference rpg sorting string strings struct temperature template test text text-file tree unix url variable vector video visualstudio win32 windows winsock word wordfrequency wxwidgets






