docs: remove stale cronjob scheduling section, update to meal-cron container
CI / test-and-package (push) Successful in 37s
CI / test-and-package (push) Successful in 37s
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
+1
-17
@@ -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
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user