Skip to content

Possible race condition between EmailNotification BG job and occ activity:send-emails #1884

@pabzm

Description

@pabzm

https://docs.nextcloud.com/server/27/admin_manual/configuration_server/activity_configuration.html#better-scheduling-of-activity-emails recommends running occ activity:send-emails from cron.

Meanwhile there's no way (that I'm aware of) to disable the EmailNotification background job without also disabling the other background jobs.

So both code triggers are active and might run at the same time.

The email-sending code loops over a list of users that should receive an email, and after all that email sending is done, deletes all items from the affected users.

So if both, the background job and the cron job, run overlapping, they might send emails twice.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions