What you are trying to do is not possible with smart contracts in this form.
A contract cannot automatically run periodically. It has to be invoked by a transaction
There are no threads in smart contracts, only single-thread synchronous execution
A contract cannot interact with off-chain services (e.g. an API)
If you want to have some kind of off-chain ...
Smart contracts does not allow for security reason to call outside services.
You will not be able to start new threads, this feature does not exist.
Can you give more details about your needs to see how we can help you ?
I followed the same procedure as you did. Made sure I have atleast 3 total nodes. The block counts on the second node stayed at 0. What i was missing was a transaction. I sent a transfer of ether between 2 accounts and started mining on the first node, and voila! The sync issue stopped
No, you will not lose any data if you restart your computer. The data will live in my/path. If you run the same command (with the same --datadir path), then the node will continue syncing from where it left off.
With that said, there is a chance that some of the data gets corrupted if you restart your computer without gracefully exiting the sync.