码迷,mamicode.com
首页 > Windows程序 > 详细

php定时执行任务(windows7)

时间:2014-06-22 16:49:54      阅读:340      评论:0      收藏:0      [点我收藏+]

标签:计划任务

1:先写自己的php文件,这里是我的一些php文件

bubuko.com,布布扣

2:新建.bat文件

写入内容:E:\WampSever\wamp\bin\php\php5.4.12\php.exe -q E:\WampSever\task\Grab1.php

E:\WampSever\wamp\bin\php\php5.4.12\php.exe  这是我的php.exe路径

E:\WampSever\task\Grab1.php  这是我的要定时运行的php文件路径
提示:要是定时执行多个php文件时候只要连起来就可以

E:\WampSever\wamp\bin\php\php5.4.12\php.exe -q E:\WampSever\task\Grab1.php
E:\WampSever\wamp\bin\php\php5.4.12\php.exe -q E:\WampSever\task\Grab2.php
E:\WampSever\wamp\bin\php\php5.4.12\php.exe -q E:\WampSever\task\Grab3.php
E:\WampSever\wamp\bin\php\php5.4.12\php.exe -q E:\WampSever\task\Grab4.php
E:\WampSever\wamp\bin\php\php5.4.12\php.exe -q E:\WampSever\task\Grab5.php
E:\WampSever\wamp\bin\php\php5.4.12\php.exe -q E:\WampSever\task\Grab6.php
E:\WampSever\wamp\bin\php\php5.4.12\php.exe -q E:\WampSever\task\Grab7.php
E:\WampSever\wamp\bin\php\php5.4.12\php.exe -q E:\WampSever\task\Grab8.php
E:\WampSever\wamp\bin\php\php5.4.12\php.exe -q E:\WampSever\task\Grab9.php
E:\WampSever\wamp\bin\php\php5.4.12\php.exe -q E:\WampSever\task\Grab10.php
E:\WampSever\wamp\bin\php\php5.4.12\php.exe -q E:\WampSever\task\Grab11.php
E:\WampSever\wamp\bin\php\php5.4.12\php.exe -q E:\WampSever\task\Grab12.php
E:\WampSever\wamp\bin\php\php5.4.12\php.exe -q E:\WampSever\task\Grab13.php
E:\WampSever\wamp\bin\php\php5.4.12\php.exe -q E:\WampSever\task\Grab14.php
E:\WampSever\wamp\bin\php\php5.4.12\php.exe -q E:\WampSever\task\Grab15.php
E:\WampSever\wamp\bin\php\php5.4.12\php.exe -q E:\WampSever\task\Grab16.php
E:\WampSever\wamp\bin\php\php5.4.12\php.exe -q E:\WampSever\task\Grab17.php
E:\WampSever\wamp\bin\php\php5.4.12\php.exe -q E:\WampSever\task\Grab18.php
E:\WampSever\wamp\bin\php\php5.4.12\php.exe -q E:\WampSever\task\Grab19.php
E:\WampSever\wamp\bin\php\php5.4.12\php.exe -q E:\WampSever\task\Grab20.php
3:bat文件建立OK后就可以建立任务计划程序

bubuko.com,布布扣

bubuko.com,布布扣

触发器里面新建设置执行时间

操作里面新建浏览刚才建立的.bat文件

这是我自己计划任务的设置选项:

bubuko.com,布布扣


条件设置根据自己的需求来设置



php定时执行任务(windows7),布布扣,bubuko.com

php定时执行任务(windows7)

标签:计划任务

原文地址:http://blog.csdn.net/u013160024/article/details/32100415

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!