计划任务
在宝塔的计划任务中添加一个计划任务,推荐每个月1号的0点30分执行,URL 地址的域名要记得改成您自己的哦,添加成功后您可以关注下定时任务的执行日志!
- 任务类型:访问 URL
- 任务名称:定期清理消息/日志表
- 执行周期:每个月1号的0点30分执行
- URL地址:http://域名/plugin.php?id=aljhtx:task
表格清单
- pre_aljhtx_notification
- pre_aljhtx_cron
- pre_home_notification
- pre_aljwsq_mapp_template_log
- pre_aljvc_goods
定期清理脚本
我们将在最新版的商家助手插件中内置此脚本,文件名是 task.inc.php ```php <?php
if (!defined(‘IN_DISCUZ’)) { exit(‘Access Denied’); }
DB::delete(‘aljhtx_notification’); DB::delete(‘aljhtx_cron’); DB::delete(‘home_notification’); DB::delete(‘aljwsq_mapp_template_log’); //DB::delete(‘aljvc_goods’);
echo 1; exit; ```
