Skip to content

Abstract the logic within send_digest_emails #9

@kevinrenskers

Description

@kevinrenskers

To quote from the readme:

Create a cron job to send daily digests:

# Send daily digests at 9 AM
0 9 * * * cd /path/to/project && uv run ./manage.py send_digest_emails --frequency daily

But what if you don't want to create a cronjob? What if you use Celery or APScheduler or whatever else? While you can import and execute the Command, it would be better if the command would execute a method defined somewhere else, and this method could be called by Celery or APScheduler or whatever.

So, TL;DR: move the logic within send_digest_emails.py to a new file, so it can be easily executed by other task runners.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions