Skip to content

Commit 96fe0b2

Browse files
committed
docs: Add usage example for send_notification_digests
1 parent 0971281 commit 96fe0b2

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,14 @@ Create a cron job to send daily digests:
131131
0 9 * * * cd /path/to/project && uv run ./manage.py send_notification_digests --frequency daily
132132
```
133133

134-
_If you already have a way the run scheduled jobs in your Django app and don't want to start a management command via a cron job, you can call the `send_notification_digests` function within `digest.py` yourself._
134+
If you already have a way to run scheduled jobs in your Django app and don't want to start a management command via a cron job, you can call the `send_notification_digests` function directly:
135+
136+
```python
137+
from generic_notifications.digest import send_notification_digests
138+
from generic_notifications.frequencies import DailyFrequency
139+
140+
send_notification_digests(frequency=DailyFrequency, dry_run=False)
141+
```
135142

136143
## Admin Integration
137144

0 commit comments

Comments
 (0)