Emails Not Sending Automatically from Queue

Hi community,

I’m facing an issue with the email queue in my ERPNext setup using Docker. Here are the details:

Environment:

  • ERPNext Version: v15.52.0
  • Frappe Version: v15.56.0
  • Deployment: Docker (using frappe_docker)
  • Scheduler Status: Enabled (checked with bench doctor)
  • Email Account: Gmail SMTP (configured and tested, works when flushed manually)

Issue:

Emails are being queued correctly in Email Queue (status = “Not Sent”), but they are not being sent automatically.

However, when I run the following command manually inside the container, the emails are sent successfully:

bench --site [my-site-name] execute frappe.email.queue.flush

So the queue system works, but the background job that should flush the queue doesn’t seem to be triggered automatically.

Why isn’t the “Email Queue” being processed automatically, even though:

  • Scheduler is running
  • Emails are queued correctly
  • Manual flush works fine
  • Verified that the scheduler is enabled and running using bench doctor

Is there anything I’m missing in Docker-based setups to ensure background jobs (like email flush) are triggered?

Thanks in advance for your help!

This is due to long and short queue containers might not be running.
You can start them it will work to send automatically
In docker-compose file which is pwd.yml which is used in frappe-docker repo it needs a small correction as below. depends on need to be set for queue-long and queue-short as these are starting before the redis-queue started and could not able to connect to it.

queue-long:
    # ... other configurations ...
    **depends_on:**
**      - redis-queue**

  queue-short:
    # ... other configurations ...
    **depends_on:**
**      - redis-queue**

Let me see if I can raise a PR for it.