Hi I test my web on my localhost(winxp+ie8+mysql5.0.51a+PHP 5.2.11+Apache 2.2.13). I want to add some cron job for my php files. I select Pycron. After configuration, I add some command in crontab.txt

* * * * * "C:\Program Files\Internet Explorer\IEXPLORE.EXE" http://localhost/test/index1.php.

It is success, it will open IEXPLORE.EXE and load index1.php for every minute. But it still open the IEXPLORE windows, not for close. how to set it automatic finish the php job, then close the IEXPLORE windows? thanks.

7 Years
Discussion Span
Last Post by youlichika
Featured Replies

I'm assuming you only want to run the php file, and not view the output. So, instead of running it with iexplore, run it with php.exe


Hi, pritaeas. I'm newer to use cron job. would you like to tell me where is the php.exe? Thanks.


Somewhere in you local setup, it depends on whether you installed everything manually, or used a tool like WAMP or XAMPP. Just look for the PHP folder.


Hi, thanks. I find it.

* * * * * "C:\Program Files\PHP5\php.exe" http://localhost/test/index1.php.

But, it is only flashing a bit on the screen(like CMD windows continued about half a second), then nothing happened. the index1.php should insert something into my database for a cron test. but now, there has nothing insert into database. I test index1.php in IE, it can work well. What do you think the problem? my php.exe is bad? Or because I use a wrong cron command code?


Thanks, pritaeas. my www folder is in e:\ I have tried

* * * * * "C:\Program Files\PHP5\php.exe" e:\www\test\index1.php.

But it also flashing a bit on the screen(like CMD windows continued about half a second), then nothing happened more...
still need your warmly help.


Thanks for a quickly replay. this time the php file can work well.
By the way, I also want cron do other orders. can cron run a bat files?

* * * * * "C:\WINDOWS\system32\cmd.exe" e:\www\test\test.bat

It looks fail. 'executing return code =-1073741510'
And how many files can a cron run at the same time? for example in 19:45, I want run 15 php files, will it cause a heavy pressure for the web server?


but how to write? there have two blanks need to write: command and paramente.
I write C:\WINDOWS\system32\cmd.exe in 'command', and write 'e:\www\test\test.bat' in paramente.
15 files all do something with database. read the database and create html pages.

Edited by youlichika: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.