in reply to Gracefully exiting and restarting at a later time.
Hi,
A very simple solution is to check at the start or end of the main loop for the existence of a stop file. If found the program would then write away it's state to a file or DB ( I like SQLite too ).
Also delete the stop file as the first thing you do in the program.
Simple and easy to work/maintain.
J.C.
|
|---|