Auto relaunch of running program
#4
Hello!
I also used this for my latest game. The server program restarts every 10 minutes if no one connects. The reason is the same. After hours, the QB64 program crashes, even if we do not touch it.

I don't think it should be overcomplicated.

The example program restarts itself every 10 seconds, and you don't need to worry about defining the startup file.


Code: (Select All)
restart_time = 10 'restart sec



start_timer = Timer
Do: _Limit 10
    If Abs(Timer - start_timer) > restart_time Then Shell _DontWait Command$(0): System
Loop


I'm reading it now. SMcNeil already wrote the solution.
Reply


Messages In This Thread
Auto relaunch of running program - by Richard - 12-30-2022, 03:14 AM
RE: Auto relaunch of running program - by MasterGy - 12-30-2022, 01:49 PM



Users browsing this thread: 2 Guest(s)