~优化定时任务

This commit is contained in:
juewuy
2026-02-08 20:13:55 +08:00
parent 32d73c18c4
commit 1afb261d0e
3 changed files with 5 additions and 6 deletions

View File

@@ -7,7 +7,7 @@ bot_tg_start(){
bot_tg_cron
}
bot_tg_stop(){
cronset 'TG_BOT守护进程'
cronload | grep -q 'TG_BOT' && cronset 'TG_BOT'
[ -f "$TMPDIR/bot_tg.pid" ] && kill -TERM "$(cat "$TMPDIR/bot_tg.pid")" 2>/dev/null
killall bot_tg.sh 2>/dev/null
rm -f "$TMPDIR/bot_tg.pid"