From 2a3101071b6ff188f35d9dc07a7630f729b4bfcc Mon Sep 17 00:00:00 2001 From: agentbox Date: Sat, 1 Aug 2026 07:27:31 +0000 Subject: [PATCH] docs: remove stale cronjob scheduling section, update to meal-cron container --- AGENTS.md | 2 +- doc/index.md | 18 +----------------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 7d3783c..be7d2a8 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -35,7 +35,7 @@ Flask web app for tracking household meal attendance. Users register into househ - **i18n:** Every user-visible string in templates uses `{{ t('English text') }}`. In Python, `flash(t("message"), "category")`. Translations live in `TRANSLATIONS` dict in `i18n.py`. English string is the key; only non-English translations stored. When adding new user-facing text, add it to `TRANSLATIONS` for fr/de. - **DB:** All access through `get_db()` context manager in `models.py`. Returns `sqlite3.Row` objects accessed as dicts. Path via `DB_PATH` env var (defaults to `/data/meals.db` in Docker, `./meals.db` locally). - **CSS:** No framework. Variables in `:root`. Use existing utility classes (`.btn`, `.chip`, `.badge`, etc.). -- **Ntfy:** Per-user topic URL + Bearer token stored in `users` table. Callback token auto-generated on first ntfy setup. `/api/ntfy-callback` is unauthenticated (uses callback token). Send reminders via `flask send-reminders [--date] [--meal] [--base-url]`. Schedule with cron. +- **Ntfy:** Per-user topic URL + Bearer token stored in `users` table. Callback token auto-generated on first ntfy setup. `/api/ntfy-callback` is unauthenticated (uses callback token). Reminders are sent automatically by the `meal-cron` container calling `POST /api/cron-tick`. ## Common Pitfalls diff --git a/doc/index.md b/doc/index.md index a8d25d9..3f4c9fd 100644 --- a/doc/index.md +++ b/doc/index.md @@ -220,25 +220,9 @@ Users can configure [ntfy](https://ntfy.sh) to receive push notifications with a ### How It Works -- Reminders are sent via the CLI command: `flask send-reminders` +- Reminders are sent automatically by the `meal-cron` container via `POST /api/cron-tick` every 60 seconds - The notification contains **Home** and **Out** buttons - Pressing a button sends an HTTP callback to the app, recording your response instantly - Tapping the notification itself opens the dashboard -### Scheduling Reminders -Add a cron job on the server to send reminders automatically: - -```bash -# Lunch reminder at 9:00 AM -0 9 * * * cd /path/to/app && docker compose exec meal-tracker flask send-reminders --meal lunch --base-url https://meals.ct.cozytren.ch - -# Dinner reminder at 5:00 PM -0 17 * * * cd /path/to/app && docker compose exec meal-tracker flask send-reminders --meal dinner --base-url https://meals.ct.cozytren.ch -``` - -Or run manually: - -```bash -docker compose exec meal-tracker flask send-reminders --date 2026-08-01 --meal both -```