This commit is contained in:
wong
2026-04-15 17:21:12 +08:00
parent b1bfcec35b
commit edfc21c373
4 changed files with 83 additions and 131 deletions

View File

@@ -44,7 +44,7 @@
```bash
# 每分钟执行一次调度器(调度器内部会根据 cron 表达式判断哪些任务需要执行)
* * * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think scheduler:run >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/scheduler.log 2>&1
* * * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think scheduler:run >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/scheduler.log 2>&1
```
### 4. 系统要求

View File

@@ -9,7 +9,7 @@ use think\console\Command;
use think\facade\App;
use WeChatDeviceApi\Adapters\ChuKeBao\Adapter as ChuKeBaoAdapter;
// */7 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think sync:wechatData >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/sync_wechat_data.log 2>&1
// */7 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think sync:wechatData >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/sync_wechat_data.log 2>&1
class SyncWechatDataToCkbTask extends Command
{
protected $lockFile;

View File

@@ -32,6 +32,7 @@
"aliyuncs/oss-sdk-php": "^2.6",
"monolog/monolog": "^1.27",
"guzzlehttp/guzzle": "^6.5",
"psr/http-client": "^1.0",
"overtrue/wechat": "~4.6",
"endroid/qr-code": "^3.9",
"phpoffice/phpspreadsheet": "^1.29",
@@ -47,74 +48,25 @@
"topthink/think-migration": "^2.0",
"phpunit/phpunit": "^5.0|^6.0"
},
"autoload": {
"psr-4": {
"app\\": "application",
"Eison\\": "extend/Eison"
},
"files": [
"application/common.php"
],
"homepage": "http://thinkphp.cn/",
"license": "Apache-2.0",
"authors": [
{
"name": "liu21st",
"email": "liu21st@gmail.com"
},
{
"name": "yunwuxin",
"email": "448901948@qq.com"
}
],
"require": {
"php": ">=5.6.0",
"topthink/framework": "5.1.41",
"topthink/think-installer": "~1.0",
"topthink/think-captcha": "^2.0",
"topthink/think-helper": "^3.0",
"topthink/think-image": "^1.0",
"topthink/think-queue": "^2.0",
"topthink/think-worker": "^2.0",
"textalk/websocket": "^1.2",
"aliyuncs/oss-sdk-php": "^2.3",
"monolog/monolog": "^1.24",
"guzzlehttp/guzzle": "^6.3",
"overtrue/wechat": "~4.0",
"endroid/qr-code": "^3.5",
"phpoffice/phpspreadsheet": "^1.8",
"workerman/workerman": "^3.5",
"workerman/gateway-worker": "^3.0",
"hashids/hashids": "^2.0",
"khanamiryan/qrcode-detector-decoder": "^1.0",
"lizhichao/word": "^2.0",
"adbario/php-dot-notation": "^2.2"
},
"require-dev": {
"symfony/var-dumper": "^3.4",
"topthink/think-migration": "^2.0"
},
"autoload": {
"psr-4": {
"app\\": "application",
"Eison\\": "extend/Eison"
},
"files": [
"application/common.php"
],
"classmap": []
},
"extra": {
"think-path": "thinkphp"
},
"config": {
"preferred-install": "dist",
"allow-plugins": {
"topthink/think-installer": true,
"easywechat-composer/easywechat-composer": true
}
},
"minimum-stability": "dev",
"prefer-stable": true
}
}
"autoload": {
"psr-4": {
"app\\": "application",
"Eison\\": "extend/Eison"
},
"files": [
"application/common.php"
]
},
"extra": {
"think-path": "thinkphp"
},
"config": {
"preferred-install": "dist",
"allow-plugins": {
"topthink/think-installer": true,
"easywechat-composer/easywechat-composer": true
}
},
"minimum-stability": "dev",
"prefer-stable": true
}

View File

@@ -4,85 +4,85 @@
```bash
# 设备列表
*/30 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think device:list >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/device_list.log 2>&1
*/30 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think device:list >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/device_list.log 2>&1
# 微信好友列表
*/5 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think wechatFriends:list >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/wechat_friends_list.log 2>&1
*/5 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think wechatFriends:list >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/wechat_friends_list.log 2>&1
# 微信群列表
*/30 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think wechatChatroom:list >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/wechat_chatroom_list.log 2>&1
*/30 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think wechatChatroom:list >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/wechat_chatroom_list.log 2>&1
# 添加好友任务列表
*/30 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think friendTask:list >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/friend_task_list.log 2>&1
*/30 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think friendTask:list >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/friend_task_list.log 2>&1
# 微信客服列表
*/30 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think wechatList:list >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/wechat_list.log 2>&1
*/30 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think wechatList:list >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/wechat_list.log 2>&1
# 公司账号列表
*/30 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think account:list >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/account_list.log 2>&1
*/30 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think account:list >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/account_list.log 2>&1
# 微信好友消息列表
*/30 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think message:friendsList >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/message_friends_list.log 2>&1
*/30 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think message:friendsList >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/message_friends_list.log 2>&1
# 微信群聊消息列表
*/30 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think message:chatroomList >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/message_chatroom_list.log 2>&1
*/30 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think message:chatroomList >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/message_chatroom_list.log 2>&1
# 部门列表
*/30 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think department:list >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/department_list.log 2>&1
*/30 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think department:list >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/department_list.log 2>&1
# 同步内容库
0 2 * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think content:sync >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/content_sync.log 2>&1
0 2 * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think content:sync >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/content_sync.log 2>&1
# 微信群好友列表
*/30 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think groupFriends:list >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/group_friends_list.log 2>&1
*/30 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think groupFriends:list >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/group_friends_list.log 2>&1
# 获取通话记录
*/30 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think call-recording:list >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/call_recording.log 2>&1
*/30 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think call-recording:list >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/call_recording.log 2>&1
# 分配规则列表
0 3 * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think allotrule:list >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/allot_rule_list.log 2>&1
0 3 * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think allotrule:list >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/allot_rule_list.log 2>&1
# 自动创建分配规则
0 4 * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think allotrule:autocreate >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/allot_rule_autocreate.log 2>&1
0 4 * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think allotrule:autocreate >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/allot_rule_autocreate.log 2>&1
# 内容采集任务
0 5 * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think content:collect >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/content_collect.log 2>&1
0 5 * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think content:collect >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/content_collect.log 2>&1
# 朋友圈采集任务
0 6 * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think moments:collect >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/moments_collect.log 2>&1
0 6 * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think moments:collect >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/moments_collect.log 2>&1
# 工作台自动点赞任务
0 7 * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think workbench:autoLike >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/workbench_auto_like.log 2>&1
0 7 * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think workbench:autoLike >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/workbench_auto_like.log 2>&1
# 工作台朋友圈同步任务
0 8 * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think workbench:moments >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/workbench_moments.log 2>&1
0 8 * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think workbench:moments >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/workbench_moments.log 2>&1
# 同步微信数据到存客宝
0 9 * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think sync:wechatData >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/sync_wechat_data.log 2>&1
0 9 * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think sync:wechatData >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/sync_wechat_data.log 2>&1
# 工作台群发消息
*/2 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think workbench:groupPush >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/workbench_groupPush.log 2>&1
*/2 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think workbench:groupPush >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/workbench_groupPush.log 2>&1
# 工作台建群
*/5 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think workbench:groupCreate >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/workbench_groupCreate.log 2>&1
*/5 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think workbench:groupCreate >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/workbench_groupCreate.log 2>&1
# 工作台通讯录导入
*/5 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think workbench:import-contact >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/import_contact.log 2>&1
*/5 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think workbench:import-contact >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/import_contact.log 2>&1
# 工作台流量分发
0 9 * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think workbench:trafficDistribute >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/traffic_distribute.log 2>&1
0 9 * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think workbench:trafficDistribute >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/traffic_distribute.log 2>&1
# 预防性切换好友
*/2 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think switch:friends >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/switch_friends.log 2>&1
*/2 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think switch:friends >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/switch_friends.log 2>&1
# 消息提醒
*/1 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think kf:notice >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/kf_notice.log 2>&1
*/1 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think kf:notice >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/kf_notice.log 2>&1
# 客服评分
0 2 * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think wechat:calculate-score >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/calculate_score.log 2>&1
0 2 * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think wechat:calculate-score >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/calculate_score.log 2>&1
@@ -92,12 +92,12 @@
## 说明
- 所有命令都在 `/www/wwwroot/ckbapi.quwanzhi.com/Server` 目录下执行
- 所有命令都在 `/www/wwwroot/ckbapi.quwanzhi.com` 目录下执行
- 默认只获取未删除(活跃)的设备、微信好友和群聊
- 已注释的命令(以#开头)是获取已删除或已停用数据的任务,可根据需要取消注释启用
- 每个命令的执行结果都会记录到对应的日志文件中
- 日志文件名格式包含了数据状态(如 `_active`, `_deleted`, `_stopped`
- 日志文件位于 `/www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/` 目录下
- 日志文件位于 `/www/wwwroot/ckbapi.quwanzhi.com/runtime/log/` 目录下
- 大部分任务每5分钟执行一次`*/5 * * * *` 表示每小时的第0,5,10,15...55分钟执行)
- 设备列表的未删除设备任务每天凌晨1点执行一次`0 1 * * *`
- 自动创建分配规则每小时整点执行一次(`0 * * * *`
@@ -120,64 +120,64 @@ crontab -l
# 设备列表 - 未删除设备(每半小时执行)
*/5 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think device:list --isDel=0 >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/crontab_device_active.log 2>&1
*/5 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think device:list --isDel=0 >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/crontab_device_active.log 2>&1
# 设备列表 - 已删除设备每天1点执行
0 1 * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think device:list --isDel=1 >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/crontab_device_deleted.log 2>&1
0 1 * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think device:list --isDel=1 >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/crontab_device_deleted.log 2>&1
# 设备列表 - 已停用设备每天1:10执行
10 1 * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think device:list --isDel=2 >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/crontab_device_stopped.log 2>&1
10 1 * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think device:list --isDel=2 >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/crontab_device_stopped.log 2>&1
# 微信好友列表 - 未删除好友每1分钟执行
*/1 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think wechatFriends:list --isDel=0 >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/crontab_wechatFriends_active.log 2>&1
*/1 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think wechatFriends:list --isDel=0 >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/crontab_wechatFriends_active.log 2>&1
# 微信好友列表 - 已删除好友每天1:30分执行
30 1 * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think wechatFriends:list --isDel=1 >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/crontab_wechatFriends_deleted.log 2>&1
30 1 * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think wechatFriends:list --isDel=1 >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/crontab_wechatFriends_deleted.log 2>&1
# 微信群列表 - 未删除群每5分钟执行
*/5 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think wechatChatroom:list --isDel=0 >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/crontab_wechatChatroom_active.log 2>&1
*/5 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think wechatChatroom:list --isDel=0 >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/crontab_wechatChatroom_active.log 2>&1
# 微信群列表 - 已删除群每天1:30分执行
30 1 * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think wechatChatroom:list --isDel=1 >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/crontab_wechatChatroom_deleted.log 2>&1
30 1 * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think wechatChatroom:list --isDel=1 >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/crontab_wechatChatroom_deleted.log 2>&1
# 微信群好友列表没5分钟执行
*/5 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think groupFriends:list >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/crontab_groupFriends.log 2>&1
*/5 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think groupFriends:list >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/crontab_groupFriends.log 2>&1
# 添加好友任务列表(每1分钟执行)
*/1 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think friendTask:list >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/crontab_friendTask.log 2>&1
*/1 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think friendTask:list >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/crontab_friendTask.log 2>&1
# 微信客服列表每5分钟执行
*/5 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think wechatList:list >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/crontab_wechatList.log 2>&1
*/5 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think wechatList:list >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/crontab_wechatList.log 2>&1
# 公司账号列表每5分钟执行
*/5 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think account:list >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/crontab_account.log 2>&1
*/5 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think account:list >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/crontab_account.log 2>&1
# 微信好友消息列表每30分钟执行
*/1 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think message:friendsList >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/crontab_messageFriends.log 2>&1
*/1 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think message:friendsList >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/crontab_messageFriends.log 2>&1
# 微信群聊消息列表每30分钟执行
*/1 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think message:chatroomList >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/crontab_messageChatroom.log 2>&1
*/1 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think message:chatroomList >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/crontab_messageChatroom.log 2>&1
# 获取通话记录
*/30 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think call-recording:list >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/call_recording.log 2>&1
*/30 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think call-recording:list >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/call_recording.log 2>&1
# 清洗微信数据
*/2 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think sync:wechatData >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/sync_wechat_data.log 2>&1
*/2 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think sync:wechatData >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/sync_wechat_data.log 2>&1
# 内容采集任务每5分钟执行
*/5 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think content:collect >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/crontab_contentCollect.log 2>&1
*/5 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think content:collect >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/crontab_contentCollect.log 2>&1
# 工作台任务_自动点赞每10分钟执行
*/6 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think workbench:autoLike >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/crontab_workbench_autoLike.log 2>&1
*/6 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think workbench:autoLike >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/crontab_workbench_autoLike.log 2>&1
# 每3天的3点同步所有好友
0 3 */3 * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think sync:allFriends >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/all_friends.log 2>&1
0 3 */3 * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think sync:allFriends >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/all_friends.log 2>&1
# 工作台流量分发
*/2 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think workbench:trafficDistribute >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/traffic_distribute.log 2>&1
*/2 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think workbench:trafficDistribute >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/traffic_distribute.log 2>&1
# 工作台朋友圈同步任务
*/2 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think workbench:moments >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/workbench_moments.log 2>&1
*/2 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think workbench:moments >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/workbench_moments.log 2>&1
# 工作台群发消息
#*/2 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think workbench:groupPush >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/workbench_groupPush.log 2>&1
#*/2 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think workbench:groupPush >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/workbench_groupPush.log 2>&1
# 预防性切换好友
*/2 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think switch:friends >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/switch_friends.log 2>&1
*/2 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think switch:friends >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/switch_friends.log 2>&1
# 工作台建群
*/5 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think workbench:groupCreate >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/workbench_groupCreate.log 2>&1
*/5 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think workbench:groupCreate >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/workbench_groupCreate.log 2>&1
# 工作台通讯录导入
*/5 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think workbench:import-contact >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/import_contact.log 2>&1
*/5 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think workbench:import-contact >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/import_contact.log 2>&1
# 工作台入群欢迎语
*/1 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think workbench:groupWelcome >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/workbench_groupWelcome.log 2>&1
*/1 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think workbench:groupWelcome >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/workbench_groupWelcome.log 2>&1
# 消息提醒
*/1 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think kf:notice >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/kf_notice.log 2>&1
*/1 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think kf:notice >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/kf_notice.log 2>&1
# 客服评分
0 2 * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think wechat:calculate-score >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/calculate_score.log 2>&1
0 2 * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think wechat:calculate-score >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/calculate_score.log 2>&1
# 采集客服自己的朋友圈
*/30 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think own:moments:collect >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/own_moments_collect.log 2>&1
*/30 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think own:moments:collect >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/own_moments_collect.log 2>&1
# 检查未读/未回复消息并自动迁移好友
*/5 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think check:unread-message --minutes=30 >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/check_unread_message.log 2>&1
*/5 * * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think check:unread-message --minutes=30 >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/check_unread_message.log 2>&1
# 每分钟执行一次调度器(调度器内部会自动判断哪些任务需要执行)
* * * * * cd /www/wwwroot/ckbapi.quwanzhi.com/Server && php think scheduler:run >> /www/wwwroot/ckbapi.quwanzhi.com/Server/runtime/log/scheduler.log 2>&1
* * * * * cd /www/wwwroot/ckbapi.quwanzhi.com && php think scheduler:run >> /www/wwwroot/ckbapi.quwanzhi.com/runtime/log/scheduler.log 2>&1