Stooney Posted September 15, 2008 Share Posted September 15, 2008 With php you can run a php script in the commands prompt via c:\xampp\php\php.exe "c:\path\to\script.php" I have a script I need ran once a minute on my server. Right now I use the windows task scheduler to do it which technically works, but every minute it brings up an ugly command prompt window for about 5 seconds (or the duration of the script). Is there a way to use autoit to both run the command every x seconds (I will have it startup with windows in the event of a server restart - rare) and not ever bring up an ugly cmd prompt window? In short I'm looking for a way to have a cmd ran in the cmd prompt every x seconds without the cmd prompt window popping up. Thanks for any help Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 15, 2008 Moderators Share Posted September 15, 2008 Local $i_timedelay = 60000 Local $s_app_name_location = "c:\xampp\php\php.exe" Local $s_command_line = "c:\path\to\script.php" While 1 Run('"' & $s_app_name_location & '" "' & $s_command_line & '"', "", @SW_HIDE) Sleep($i_timedelay) WEnd Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Stooney Posted September 15, 2008 Author Share Posted September 15, 2008 I love you I really think I'll learn autoit now. Was gonna go back to c++ now that I've got php down (enough to run a web dev business), but I think autoit will come first now. C++ can wait a bit longer. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now