🌱add task ql bot
This commit is contained in:
parent
78f4652823
commit
ab819c98ac
@ -98,4 +98,13 @@ task_before_size=$(ls -l $task_before_shell_path | awk '{print $5}')
|
||||
if (( $(echo "${task_before_size} < 100" | bc -l) )); then
|
||||
echo "task_before.sh 下载失败"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
# 将 bot 添加到定时任务
|
||||
if [ "$(grep -c bot /ql/config/crontab.list)" = 0 ]; then
|
||||
echo "开始添加 task ql bot"
|
||||
# 获取token
|
||||
token=$(cat /ql/config/auth.json | jq --raw-output .token)
|
||||
curl -s -H 'Accept: application/json' -H "Authorization: Bearer $token" -H 'Content-Type: application/json;charset=UTF-8' -H 'Accept-Language: zh-CN,zh;q=0.9' --data-binary '{"name":"拉取机器人","command":"ql bot","schedule":"13 14 * * *"}' --compressed 'http://127.0.0.1:5700/api/crons?t=1626247933219'
|
||||
fi
|
||||
Loading…
Reference in New Issue
Block a user