Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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

Possibly Related Threads…
Thread Author Replies Views Last Post
  Running QB64 v2 InForm Programs on PE Magdha 2 361 11-19-2025, 11:10 AM
Last Post: Magdha
  auto-detecting screen resolution for optimal window size on non-Windows systems madscijr 11 1,070 11-10-2025, 07:23 PM
Last Post: madscijr
  auto-detecting screen resolution for optimal window size on non-Windows systems madscijr 0 218 10-26-2025, 06:58 PM
Last Post: madscijr
  Compiler and Running Disagree Vespin 4 884 10-15-2024, 06:45 PM
Last Post: Kernelpanic
  Detect running from IDE mdijkens 1 583 02-12-2024, 02:59 AM
Last Post: FellippeHeitor

Forum Jump:


Users browsing this thread: 1 Guest(s)