如何在计划任务中运行 PHP 文件(Windows 任务计划程序) [英] How to run a PHP file in a scheduled task (Windows Task Scheduler)

查看:40
本文介绍了如何在计划任务中运行 PHP 文件(Windows 任务计划程序)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何创建计划任务来运行 PHP 文件?
是的,我把定时任务里的都填了,还是不行.

<块引用>

运行:C:Program FilesApache Software FoundationApache2.2htdocsWEB4w_websitesave.php"

开始于:C:Program FilesApache Software FoundationApache2.2htdocsWEB4w_website"

它只是在记事本中打开 PHP 文件.

我提供了正确的用户名和密码.

请帮帮我..

解决方案

Run 命令应该是

<前>C:Path ophp.exe -f "C:Path ofile.php"

来自 php.exe 的命令行帮助:

<前>-f 解析并执行 .

How can I create a scheduled task to run a PHP file?
Yes, I filled out everything in the scheduled task, but it still doesn't work.

Run: "C:Program FilesApache Software FoundationApache2.2htdocsWEB4w_websitesave.php"

Start in: "C:Program FilesApache Software FoundationApache2.2htdocsWEB4w_website"

It just opens the PHP file in Notepad.

I gave the correct user name and pwd.

Please help me..

解决方案

The Run command should be

C:Path	ophp.exe -f "C:Path	ofile.php"

From the command line help of php.exe:

-f         Parse and execute <file>.

这篇关于如何在计划任务中运行 PHP 文件(Windows 任务计划程序)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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