配置更新

This commit is contained in:
2026-07-15 15:44:48 +08:00
parent a9b8497b9d
commit 3b3dbdf294
9 changed files with 59 additions and 38 deletions
+23
View File
@@ -0,0 +1,23 @@
#!/bin/bash
# 运动提醒触发条件脚本
# 返回 0(触发)或 1(跳过)
HOUR=$(date +%H)
DOW=$(date +%u) # 1=周一, 5=周五, 2/4=周二/周四
# 只在工作日执行 (1-5)
if [ "$DOW" -lt 1 ] || [ "$DOW" -gt 5 ]; then
exit 1
fi
# 9:00-17:00 整点提醒(12点午休跳过)
if [ "$HOUR" -ge 9 ] && [ "$HOUR" -le 17 ] && [ "$HOUR" -ne 12 ]; then
exit 0
fi
# 周二/周四 20:00 额外提醒
if [ "$HOUR" -eq 20 ] && { [ "$DOW" -eq 2 ] || [ "$DOW" -eq 4 ]; }; then
exit 0
fi
exit 1