views:

233

answers:

2

Hi Guys,

I am using Windows server 2003, IIS6, php and mysql. I have a problem setting the cronjob using built in schedule task feature in Windows OS.

  • Start > Programs > Accessories > System Tools > Schedule Tasks

  • Add "new schedule task"

  • It asks me choose programs. Should I choose php.exe or internet explorer, because php files run on internet browser right? How do I call the specific php files (assume the name of the file is cronjob.php)

I need your guys help. Please advise.

A: 

You'll need to call php.exe as the interpreter with the path to the script as its argument, example:

"c:\program files\php5\php.exe" c:\cronscripts\cronjob.php

That should work.

Ninefingers
Thanks. Is it possible to make run every 2 minutes? Cuz I want to do a testing first. So far it asked me daily,monthly or specify the day, but I cant afford to wait for that long to do the test LOL. You get what I mean?
windowsdummy
Yep, no idea though, there should be an option to do it I would have thought. You could just call the script using the command line every two minutes just like above, though. Might be easier, then you can generate more results in 2 minutes' time than 1...
Ninefingers
A: 

You call

php.exe cronjob.php
Andy