scheduled task on Windows Server PHP


The final step will be to set the script to run automagically. For starters, we need to get out our Task Scheduler. From the task bar, click Start -> Programs -> Accessories -> System Tools -> Scheduled Tasks. You may not have any scheduled tasks defined yet, in which case you’ll see only an icon to add a scheduled task, but don’t click it! I know it’s tempting, but that opens one of those fancy “wizards” and we would rather do things the unwizard way, thank you very much. A numbered list will walk us through the next steps. I give you – Mr. Numbered List!

1. Right-click on an empty spot in the Scheduled Task window and select New -> Scheduled Task (Also accessible via File -> New -> Scheduled Task)
2. Name the new task (How about “Bill”? He looks like a Bill, doesn’t he? “Mr. B. Evolution, II” It sounds so regal.)
3. Double-click the new task to open the properties window (or File -> Properties)
4. Under the Task tab, enter the same command that you used to test the script above. For instance, I would enter:
C:\PHP\php.exe “C:\Inetpub\wwwroot\blogs\cron\cron_exec.php”
5. Go to the Schedule tab and enter when and how often the task should run. The schedule defaults to run once daily and should be fine for basic usage, but feel free to tweak as needed.
6. The rest of the fields can be left as-is, unless you’re an ace and know what you’re doing.
7. Click OK and we’re done!

source: http://manual.b2evolution.net/Set_up_a_Windows_Scheduled_Task

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s