feat: improve scheduled push notifications
This commit is contained in:
16
README.md
16
README.md
@@ -224,11 +224,13 @@ Putzliga nutzt echte Web-Push-Benachrichtigungen mit Service Worker und VAPID.
|
||||
```bash
|
||||
flask --app app.py notify-due
|
||||
flask --app app.py notify-monthly-winner
|
||||
flask --app app.py notify-all
|
||||
```
|
||||
|
||||
`notify-due`:
|
||||
|
||||
- prüft offene Aufgaben, die heute oder morgen fällig sind
|
||||
- sendet ab 09:00 Uhr genau einen Sammel-Push pro Nutzer und Tag
|
||||
- berücksichtigt nur offene Aufgaben, die heute fällig sind
|
||||
- berücksichtigt die Nutzeroption `notification_task_due_enabled`
|
||||
|
||||
`notify-monthly-winner`:
|
||||
@@ -237,12 +239,24 @@ flask --app app.py notify-monthly-winner
|
||||
- verweist auf das Scoreboard/Archiv des letzten Monats
|
||||
- berücksichtigt `notification_monthly_winner_enabled`
|
||||
|
||||
Badge-Pushes:
|
||||
|
||||
- werden direkt beim Freischalten eines neuen Badges verschickt
|
||||
- berücksichtigen `notification_badge_enabled`
|
||||
- funktionieren für Aufgaben-Badges und Monats-Badges
|
||||
|
||||
Für iPhone/iPad muss zusätzlich sichergestellt sein, dass der Server ausgehend Apple Web Push erreichen kann. Laut WebKit sollten dafür Verbindungen zu `*.push.apple.com` möglich sein.
|
||||
|
||||
### Produktiver Betrieb
|
||||
|
||||
Auf Cloudron oder einem anderen Server solltest du diese Kommandos regelmäßig per Cronjob oder Task ausführen, zum Beispiel:
|
||||
|
||||
```bash
|
||||
flask --app /app/app.py notify-all
|
||||
```
|
||||
|
||||
Wenn du lieber getrennt schedulen willst, funktionieren auch weiterhin:
|
||||
|
||||
```bash
|
||||
flask --app /app/app.py notify-due
|
||||
flask --app /app/app.py notify-monthly-winner
|
||||
|
||||
Reference in New Issue
Block a user