Welcome to WebmasterWorld Guest from 126.96.36.199
Forum Moderators: bill
FROM CMD, it works fine from one line:
cd C:\Program Files\PHP & php -f tester.php & exit
FROM SCHEDULED TASK, not so much:
Run: C:\WINDOWS\system32\cmd.exe & cd C:\Program Files\PHP & php -f tester.php & exit
Start in: C:\WINDOWS\system32\
This just results in opening the dos terminal.
Can anyone suggest how I can run this command from a scheduled tasks....feel like I;m almost there.
GREATLY APPRECIATE IT.
I got it working now. If others need to know.
Run: (This is your .bat file, my example is below)
Start In: C:\WINDOWS\system32\ (I pointed this to where cmd.exe is)
If anyone else finds this useful, please thank Bill and Jake above.
I tried everything to find this guidance online and couldn't. If you like me and you stumble upon this forum (for me, it's alot), register and say thanks to them.
THANK YOU GUYS!
You can probably skip the
portion and just list the command for your PHP in the batch file.
To test this open C:\WINDOWS\system32\cmd.exe manually, CD to the directory where you saved the batch file, and simply type the batch file name, and hit Enter. You should return to a prompt after the batch runs, or you'll see any error messages associated. Running a batch file from the GUI will often flash by too quickly to let you see if it worked or not (or if there were error messages.)
If anyone knows a way to prevent the dos window from opening but still run the script, that would be awesome if you could let me know.