From 7f408c1ad11daa3eea311f8cbf065e7a6e3c71ce Mon Sep 17 00:00:00 2001 From: Nik Afiq Date: Sat, 1 Aug 2026 21:49:02 +0900 Subject: [PATCH] feat: add cron setup instructions for unattended scheduling of ba_cron_run.sh --- setup.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/setup.sh b/setup.sh index b44414d..f70c709 100755 --- a/setup.sh +++ b/setup.sh @@ -80,3 +80,23 @@ echo "Run 'source ~/.bashrc' or open a new shell to pick up completion" echo "== Done ==" echo "Run with: $REPO_DIR/ba_dailies.sh [mailbox|cafe|stamina|story_sweep|shop_common|shop_tactical|lesson]" echo "(requires the game already running, window titled 'BlueArchive')" + +echo "" +echo "== Cron (optional, not installed by this script) ==" +echo "This script does NOT touch crontab -- it's host-level scheduled state, not" +echo "checkout content, and mutating it isn't safe to run unconditionally on every" +echo "re-run of this script the way the venv/tool checks above are. To wire up" +echo "unattended scheduling yourself, run 'crontab -e' and add lines like:" +echo "" +echo " 30 3 * * * $REPO_DIR/ba_cron_run.sh daily" +echo " 30 4 * * * $REPO_DIR/ba_cron_run.sh daily" +echo " 0 1,5,9,13,17,21 * * * $REPO_DIR/ba_cron_run.sh q4h" +echo "" +echo "(times are this host's local system time; presets are defined in" +echo "ba_daily.py's PRESETS dict -- 'daily' and 'q4h' above are examples, not" +echo "the only valid names). Always call ba_cron_run.sh, never ba_dailies.sh" +echo "directly from cron -- it wraps the run in a flock so overlapping fire" +echo "times can't launch concurrent xdotool/scrot sessions against the same" +echo "game window, and logs each run to ~/ba_logs/.log." +echo "Check crontab -l afterward to confirm; that output is the source of" +echo "truth for the live schedule, not this script."