Jump to content

Best way to restart?


Recommended Posts

I'm looking for some suggestions for how to restart the application I have.

For example:

While $Stop_Running = 0
_Startup_Function1()
_Startup_Function2()
   While $Restart = 0
        _Function1()
        _Function2()
        _Function3()
        _Function4()
       .
       .
       .
       .
   Wend
Wend

Exit

Without putting in a giant If....Endif loop in each function, I'd like to call for an app restart if certain conditions are met. I'd like to avoid an If....EndIf in each function or around each _FunctionX() line in the main body of the code, there are just too many, and it seems as if there's a better way I just don't know it. What I'm trying to do is restart the application I have scripted every 2 hours. It's easy if I don't hit a restart condition while the main functions are running, but, there are a few tests where a restart of the application is called for in a _FunctionX(). Without the If....EndIf's I don't see how I can do it.

Is there a more efficient way that I am missing?

Thanks.

Link to comment
Share on other sites

While $Stop_Running = 0
_Startup_Function1()
_Startup_Function2()
   While $Restart = 0
        _Function1()
        _Function2()
        _Function3()
        _Function4()
       .
       .
       .
       .
   Wend
Wend

ExitoÝ÷ Ûú®¢×Ú)ºØ­jz-êðk"j{^²ÛayÊ'v+b¢{+z«¢®)àj·¬µªí¡ûayªi'¶*'NjȲÜÊÚ,zÛaȬ¶·MúEë-j»

Either one of those just strike me as completely inefficient. Hence the question.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...