|
-
May 19th, 2011, 11:20 AM
#1
is there a way to "save" the state of the program if it's abruptly terminated?
I have a console program that will be running in the background (to monitor changes in directories, then query database, etc, then sends email when there's a problem - based on the records that are saved/or not saved in the DB)..
I have counters, boolean values, etc that I maintain and use within the code as I progress from one line to another..
Now, I was asked - Can I make this program to "recover" if the program is "accidentally" terminated and opened again?
I was thinking of: when the console program is closed, I save all the variables, etc from a .txt file and when it starts up, it looks for that .txt file and get all the counters from there.
Is there any other way of doing this?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|