宝塔 windows 执行PHP计划任务
发布时间:2021-11-01 14:48:42 所属栏目:经验 来源:互联网
导读:宝塔Window面板下如何执行PHP计划任务1.简历一个.bat文件,内容为:D:phpStudyPHPTutorialphpphp-7.0.12-ntsphp.exe -f D:phpStudyPHPTutorialWWWandypublicindex.php index/index/index执行。如果已经配置过(PHP)环境变量则使用下面的 :php -f
宝塔Window面板下如何执行PHP计划任务
1.简历一个.bat文件,内容为:
"D:phpStudyPHPTutorialphpphp-7.0.12-ntsphp.exe" -f "D:phpStudyPHPTutorialWWWandypublicindex.php" "index/index/index"
执行。
如果已经配置过(PHP)环境变量则使用下面的 :
php -f "D:phpStudyPHPTutorialWWWandypublicindex.php" "index/index/index"
宝塔 windows 执行PHP计划任务
如果你的是多级控制器:
"D:phpStudyPHPTutorialWWWandypublicindex.php" "index/arm.index/index"
宝塔 windows 执行PHP计划任务
2.打开打开 任务计划程序
开始-控制面板-管理工具-任务计划程序
添加任务 配置如下
宝塔 windows 执行PHP计划任务
宝塔 windows 执行PHP计划任务
宝塔 windows 执行PHP计划任务
如果你配置后,仍然不能运行:请使用cmd命令执行看看报错:
执行命令:
"D:phpStudyPHPTutorialphpphp-7.0.12-ntsphp.exe" -f "D:phpStudyPHPTutorialWWWandypublicindex.php" "index/index/index"
配置过(PHP)环境变量
执行命令:
php -f "D:phpStudyPHPTutorialWWWandypublicindex.php" "index/index/index" (编辑:PHP编程网 - 黄冈站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |