mirror of
https://github.com/kuhyx/wake-alarm.git
synced 2026-11-10 19:27:02 +01:00
The first carrot only opened at 08:30: someone up at 07:00 (the goal) got the LeetCode gate at the 05:00 login-arm, and the workout lock was held off by an unrelated clock. A day with no session yet is now exempt until the phone's alarm plus 15 min -- clamped to the 08:00 baseline like the trigger -- so the login-arm defers by itself; the alarm rings regardless, and a dismiss that has produced no session by then means "not up". The refresher runs from 05:00 (every 10 min until 07:00) so the file is today's when the locks decide. The rule moved to _session_policy (250-line cap). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XTdfXjbGYYrY7Quxcfz6mg
20 lines
702 B
SYSTEMD
20 lines
702 B
SYSTEMD
[Unit]
|
|
Description=Wake Alarm morning-session refresh, every 2 min through the morning
|
|
Documentation=https://github.com/kuhyx/wake-alarm
|
|
|
|
[Timer]
|
|
# From 05:00 (the night lockdown lifts and the login-armed locks decide):
|
|
# every 10 min until the alarm hour is near, every 2 min from 07:00 to 10:58,
|
|
# then once at 11:00 (the carrot's end) so the last rewrite lands on the
|
|
# boundary. ~133 Firebase reads/day.
|
|
OnCalendar=*-*-* 05..06:00/10:00
|
|
OnCalendar=*-*-* 07..10:00/2:00
|
|
OnCalendar=*-*-* 11:00:00
|
|
AccuracySec=1s
|
|
# A PC booted mid-morning refreshes at once; the consumers wait up to 30 s
|
|
# for exactly this catch-up before treating the file as stale.
|
|
Persistent=true
|
|
|
|
[Install]
|
|
WantedBy=timers.target
|