|
From: Patel, N. M <Nil...@qu...> - 2005-02-21 16:29:10
|
If there a way in c++ where I can have a data file being created = everyday or at a specific time/date.=20 Currently I am creating a new file after every 100th entry, which works = GREAT.=20 I have searched online for some help, but unable to. Is there any syntax = or algorithms for creating a new file, giving a specific time or date.=20 example, create a new file every month, year, etc. ????? any help will be greatful.=20 -----Original Message----- From: dev...@li... [mailto:dev...@li...]On Behalf Of dev...@li... Sent: Monday, February 21, 2005 10:52 AM To: dev...@li... Subject: Dev-cpp-users digest, Vol 1 #2324 - 6 msgs Send Dev-cpp-users mailing list submissions to dev...@li... To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/dev-cpp-users or, via email, send a message with subject or body 'help' to dev...@li... You can reach the person managing the list at dev...@li...=09 |
|
From: jose i. c. <ji...@ci...> - 2005-02-21 16:51:09
|
Are you asking how to code this or is there a c++ function that will do=20 this? I don't know of one in c++, but the posibilities of doing this wit= h=20 your program are endless (of course, depending on what you really want to= =20 do.) I will suggest, however, to look at the at command for both unix (m= an=20 at) and windows (help at). It will let the OS do that job for you instea= d=20 of you having to figure out the whole time/date problem. Plus, your progr= am=20 won't be running all the time, but instead, it will be run at the specifi= c=20 time that you want. ie, Windows: at next: tuesday createfile.exe Unix: at -q s -m -f bin/sendgaz 5:30 Tomorrow by the way, in Unix, there are different flavor of at/cron or other=20 utilities that could do this for you. I hope this helps. jos=E9 ----- Original Message -----=20 From: "Patel, Nilesh M" <Nil...@qu...> To: <dev...@li...> Sent: Monday, February 21, 2005 11:28 AM Subject: [Dev-C++] new file creation > > If there a way in c++ where I can have a data file being created everyd= ay=20 > or at a specific time/date. > Currently I am creating a new file after every 100th entry, which works= =20 > GREAT. > > I have searched online for some help, but unable to. Is there any synta= x=20 > or algorithms for creating a new file, giving a specific time or date. > > example, create a new file every month, year, etc. ????? > > any help will be greatful. > > > > -----Original Message----- > From: dev...@li... > [mailto:dev...@li...]On Behalf Of > dev...@li... > Sent: Monday, February 21, 2005 10:52 AM > To: dev...@li... > Subject: Dev-cpp-users digest, Vol 1 #2324 - 6 msgs > > > Send Dev-cpp-users mailing list submissions to > dev...@li... > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > or, via email, send a message with subject or body 'help' to > dev...@li... > > You can reach the person managing the list at > dev...@li... > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_ide95&alloc_id=14396&op=CCk > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > >=20 |
|
From: Alfred P. R. <al...@ya...> - 2005-02-21 17:23:43
|
Schedule a task which calls the executable that generates the data file at a given date and time. cron in Unix/Linux, Task Scheduler in Windows xx. "Patel, Nilesh M" <Nil...@qu...> wrote: If there a way in c++ where I can have a data file being created everyday or at a specific time/date. Currently I am creating a new file after every 100th entry, which works GREAT. <snip> Alfred P. Reaud |
|
From: Gerson L. <ja...@ya...> - 2005-02-22 03:46:55
|
Hello all!. I must first apologize for not beeing specific, its not my style but... there are just some general ideas: #include <time.h> // for C programs #include <ctime> // for C++ programs Im not shure how to use this library, but the function time returns a value representing the actual time of the system, i think it is an integer counting the miliseconds transcurred since some important date. the idea is to check the diference between two "timestamps". I've done such thing but for interval of minutes... Also, there is a Timer event that may be useful, but it requieres windows programing, I mean WinAPI functions, since the timer messages are given to a window as otrar messages... like pressing a button in the mouse sends a message to the corresponding window. this may be a lot of hard work for a little task... If your program runs on a computer that is being turned on and of constanlty or between the interval you need to create the files, (in windows) i sugest to have a very little "dot exe" placed in Start Menu/Programs/startup, or a shortcut. The program should only check the date/time an determine wich tasks must be done, and if any, call the main program. Make this as small as possible in order to not make the system startup any longer. Another way of doing this is to set a value n the registry, usually in HKLM/software/microsoft/windows/current version/run, the value of type string must be tha complete path of the program to run.( i have done this manually, no idea how o white to the registry via code) (Win98 and WinXP, others, I DONT KNOW) I supose Linux has something similar. If you are shure the program will be running by the time the file is to be created, the only thing you need is to be constantly cheking the date/time. my apologies again, too much words, i know. If anyone can iluminate me about what i mentioned, I WILL apeciate it. I once did something like our firend here needs, but I used Visual Basic. (it was not voluntary!!!) so... "Patel, Nilesh M" <Nil...@qu...> wrote: If there a way in c++ where I can have a data file being created everyday or at a specific time/date. Currently I am creating a new file after every 100th entry, which works GREAT. I have searched online for some help, but unable to. Is there any syntax or algorithms for creating a new file, giving a specific time or date. example, create a new file every month, year, etc. ????? any help will be greatful. -----Original Message----- From: dev...@li... [mailto:dev...@li...]On Behalf Of dev...@li... Sent: Monday, February 21, 2005 10:52 AM To: dev...@li... Subject: Dev-cpp-users digest, Vol 1 #2324 - 6 msgs Send Dev-cpp-users mailing list submissions to dev...@li... To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/dev-cpp-users or, via email, send a message with subject or body 'help' to dev...@li... You can reach the person managing the list at dev...@li... ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click _______________________________________________ Dev-cpp-users mailing list Dev...@li... TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users --------------------------------- |