wecenter定时任务开启教程

君笑尘
君笑尘 This guy is lazy,Introduction has not been set

0 People liked this article · 419 views

wecenter定时任务是一个很强大的计划任务功能,接下来看看怎么实现吧!


第一步,打开后台找到系统拓展->定时任务->注册系统默认任务


第二步,全选所有的任务,然后点击开始监听进程。

如果提示监听失败,那么就需要查看你的服务器是否禁用了exec。



如何查看是否禁用了exec函数?

以宝塔为例,打开软件商店->运行环境->找到你的PHP版本(设置)->禁用删除->删除exec的禁用,即可



第三步,把php加入系统环境变量

如果你用的是宝塔,那么可以忽略这一步,基本上都是默认有的了。

如果你服务器上有多个php版本,那么可能需要这样设置,选择你网站当前运行的php版本



验证你网站的定时任务有没有成功启动?

最简单的方法,就是点击主进程状态,看看有没有提示,以及查看执行次数,只要有一个不是0,就代表定时任务启动成功了




======附录======

其他linux设置php环境变量的方法:

1,编辑环境变量文件
vim /etc/profile


2,在文件最后加上引入php运行目录,我的在/usr/local/php/bin
export PATH=$PATH:/usr/local/php/bin


3,保存退出,执行指令使环境变量生效
source /etc/profile


4,检测是否配置成功,执行php -v,返回版本号就成功了

Published on 2022-12-01 23:15

Disclaimers:

This document is written by 君笑尘 Original published on 君笑尘编程学习社区 ,The copyright belongs to the author。

Log in,More exciting content waiting for you to find,Contribute wonderful answers,Participate in comment interaction

go Sign in! No accountgoregister

All Rights Reserved Powered BY WeCenter V4.1.0 © 2023 粤ICP备2020123311号