windows7 thinkphp做定时任务

2025-07-24 05:36:14

1、首先写好定时任务要执行的php程序

windows7 thinkphp做定时任务

2、获取thinkphp项目目录和php目录地址

windows7 thinkphp做定时任务
windows7 thinkphp做定时任务

3、写bat执行程序,thinkphp需要切到项目根目录执行

windows7 thinkphp做定时任务

4、然后添加定时任务开始 》 附件 》系统工具 》计划任务

windows7 thinkphp做定时任务

5、添加定时任务

windows7 thinkphp做定时任务
windows7 thinkphp做定时任务
windows7 thinkphp做定时任务

6、运行测试,看下可不可以运行,下面是我打印的日志,没有问题

windows7 thinkphp做定时任务
windows7 thinkphp做定时任务

7、linux 可以用crontab做定时任务,和windows操作差不多

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢