在Windows Server 2003上设置PHP cron作业 [英] Set PHP cron job on windows server 2003

查看:159
本文介绍了在Windows Server 2003上设置PHP cron作业的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Windows Server 2003,IIS6,php和mysql。

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

添加新计划任务

。我应该选择php.exe或internet explorer,因为php文件运行在互联网浏览器上吗?如何调用特定的php文件(假设文件名为cronjob.php)

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)

家伙帮助。请指导。

推荐答案

如果您想要每分钟运行计划任务,您必须通过命令设置它,如下:

if you would like to run the scheduled task every minute you have to set it up through the command like as follows:

schtasks /create /sc minute /mo 1 /tn "my task" /tr "C:\Program Files\php5\php.exe c:\wwwroot\inetpub\website\myfile.php?task=fetch"

这将让你每分钟运行任务。没有办法做到这一点通过任务调度器gui到我的知识,所以我只是想分享这个解决方案。

This will let you run the task each minute. There is no way to do this through to the task scheduler gui to my knowledge so I just wanted to share this solution.

这篇关于在Windows Server 2003上设置PHP cron作业的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆