Jump to content

Scheduled Task every 2 Seconds


Recommended Posts

Hello Guys,

I am very new into scripting so I have no clue how to get this done. I have been looking for the solution over the internet for the last two days but have not been able to come up with any solutions.

So here is what I need :

I need a script that will run on the background every two seconds to check if a software is running or not. If it is running then it will do nothing. But if the software has been shoutdown it will start the software using the command "start.exe 2"

I need it to be running the the backgroup, should not popup or something.. Can some one help me out with a script. I would really appreciate it.

Waiting for a reply. Thank You.

Link to comment
Share on other sites

You could make another script using a while loop. Example:

While 1

If not processexists(process.exe) then

run('command "start.exe 2"')

endif

sleep(25)

WEnd

You can also incorporate this idea into your main script to make sure this program isn't closed. That way, neither of the scripts can be closed.

Link to comment
Share on other sites

You could make another script using a while loop. Example:

While 1

If not processexists(process.exe) then

run('command "start.exe 2"')

endif

sleep(25)

WEnd

You can also incorporate this idea into your main script to make sure this program isn't closed. That way, neither of the scripts can be closed.

Alright let me try this out.

Link to comment
Share on other sites

What is this for... exactly?

8)

I got it working. Its for a software that I want my computer to run all the time.

Now I have another thing that I need to concentrate at. What I want is that my computer will check if my computer is online, if it is online then it will connect to the internet. I will be using PPPOE.

Here is the quote that I am refering man :

$var = Ping("www.AutoItScript.com")
If Not $var  Then; also possible:  If @error = 0 Then ...
[What command to I use to connect to the interet "PPPOE"]
Else
    Msgbox(0,"Status","Online, roundtrip was:" & $var)
EndIf
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...