php文件未在Windows Server 2003计划任务中运行

时间:2014-08-15 08:06:45

标签: php scheduled-tasks windows-server-2003

我尝试在Windows Server 2003中运行带有计划任务的abc.php文件 我试过命令promt;
schtasks / create / sc minute / mo 1 / tn“mytask”/ tr“C:\ PATHOFPHP \ php.exe C:\ wamp .. \ abc.php”仍然无法正常工作
我也尝试了另一种方式 start-> programs-> accesories->系统工具 - >计划任务。不工作。
在我的任务窗口中;
运行:php5.3.13 \ php.exe c:\ wamp \ www .. \ abc.php 开始于:C:\ wamp \ bin \ php \ php5.3.13

2 个答案:

答案 0 :(得分:0)

您需要创建一个.bat文件并按计划运行:Open -> Control panel - > Administrative Tools - > task Scheduler

以下是您将如何做的示例:

@echo off
start "abc.php running" "C:\Program Files (x86)\PHP\v5.3\php.exe" -f C:\wwwroot\reminder-email.php

答案 1 :(得分:0)

试试这个,

打开 - >控制面板 - >管理工具 - >任务计划程序

打开任务计划程序并创建新的基本任务,如下面的屏幕截图: enter image description here

2) after that select Daily and click next
3) Specify the start date and end date click next
4) Action program click next

enter image description here

5) Start a Program browse Program/Script, here in this section create one test.bat file with the following content as below and browse here.

@echo off
"c:\Program Files\Internet Explorer\iexplore.exe"
sleep1
start "webpage name" "http://www.google.com/"

在上面的示例中我使用的是google页面,您可以使用您的php页面。

6) click finish
相关问题