添加定时任务脚本
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
# code-bang 定时任务 -> /etc/cron.d/code-bang
|
||||
# 放置后 cron 自动加载,无需执行任何脚本。修改 APP_ROOT / PHP 两处路径即可。
|
||||
SHELL=/bin/bash
|
||||
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
MAILTO=""
|
||||
|
||||
APP_ROOT=/var/www/code-bang/backend
|
||||
PHP=/usr/local/bin/php
|
||||
|
||||
# 投标开标 + 中标后超时未确认弃权(超时配置为 300 秒级,故每分钟执行)
|
||||
* * * * * nginx cd ${APP_ROOT} && flock -n /tmp/cb-bidding.lock ${PHP} think bidding:deal >> ${APP_ROOT}/runtime/cron/bidding-deal-$(date +\%Y\%m).log 2>&1
|
||||
|
||||
# 确认收货超时(7 天自动收货)+ 订单收益解冻
|
||||
*/10 * * * * nginx cd ${APP_ROOT} && flock -n /tmp/cb-demand.lock ${PHP} think demand:deal >> ${APP_ROOT}/runtime/cron/demand-deal-$(date +\%Y\%m).log 2>&1
|
||||
|
||||
# 群聊二维码拉取更新(每日凌晨执行)
|
||||
0 3 * * * nginx cd ${APP_ROOT} && flock -n /tmp/cb-groupchat.lock ${PHP} think groupChat:fetch >> ${APP_ROOT}/runtime/cron/groupchat-fetch-$(date +\%Y\%m).log 2>&1
|
||||
Reference in New Issue
Block a user