| 2:23 am on Oct 22, 2009 (gmt 0)|
Can you put the commands into a batch file and run that instead?
| 3:41 am on Oct 22, 2009 (gmt 0)|
i dont know how to do that
| 3:46 am on Oct 22, 2009 (gmt 0)|
Save the command in notepad and save the file as cron.bat and make sure that the file type is set to all, otherwise you'll have a file name called cron.bat.txt
Then go into Scheduled tasks and set a task to run at whatever day and time you want, and point it to the .bat file.
| 4:00 am on Oct 22, 2009 (gmt 0)|
THANK YOU SO MUCH youfoundjake and bill for your guys help.
would this be the command:
C:\WINDOWS\system32\cmd.exe & cd C:\Program Files\PHP & php -f tester.php & exit
cd C:\Program Files\PHP & php -f tester.php & exit
| 4:07 am on Oct 22, 2009 (gmt 0)|
THANK YOU SO MUCH FOR ALL YOU GUYS GUIDANCE!
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!
| 5:10 am on Oct 22, 2009 (gmt 0)|
Glad that worked for you Mike.
You can probably skip the
C:\WINDOWS\system32\cmd.exe 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.)
| 1:55 am on Oct 23, 2009 (gmt 0)|
You can also add a pause on the next line in the batch file which will keep the window open until you hit a key, which will close it out. That way, if there are errors, they will still be on the screen..
| 3:04 am on Oct 23, 2009 (gmt 0)|
Thank you so much guys for your support! The script works great, right now I'm looking up a command to hide it from opening....but anyways, I'll be away from my come for the next hour or so American Chopper is back on. (lol)
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.
| 3:54 am on Oct 23, 2009 (gmt 0)|
The easiest way would probably be to create a shortcut to the .bat file, and then set the properties of the shortcut to run Minimized. However, it will still be visible in the task bar.