# Email cron job is never executed (Docker, passbolt:2.11.0-debian)

**URL:** <https://community.passbolt.com/t/email-cron-job-is-never-executed-docker-passbolt-2-11-0-debian/2211>\
**Category:** Installation Issues\
**Created:** [November 20, 2019, 10:43pm UTC](https://community.passbolt.com/t/email-cron-job-is-never-executed-docker-passbolt-2-11-0-debian/2211 "2019-11-20T22:43:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![waffles](https://avatars.discourse-cdn.com/v4/letter/w/67e7ee/32.png) [@waffles](https://community.passbolt.com/u/waffles)\
**Post date:** [November 20, 2019, 10:43pm UTC](https://community.passbolt.com/t/email-cron-job-is-never-executed-docker-passbolt-2-11-0-debian/2211/1 "2019-11-20T22:43:02Z")

</div>

Greetings. I’ve set up Passbolt with Docker with the following image: passbolt/passbolt:2.11.0-debian, and everything is running fine except for email notifications.

The issue I’m running into is that email cron job never appears to be run, and the /var/log/cron.log file is never created. When I request a password reset in the web UI, an email is queued but never sent.

If I connect to the container and manually execute the command in the cron job (`su -c "source /etc/environment ; /var/www/passbolt/bin/cake EmailQueue.sender" -s /bin/bash www-data >> /var/log/cron.log 2>&1`), all queued emails are successfully sent and received. So the email side of things is definitely working.

Running `/etc/init.d/cron status` shows that cron is running. Adding valid test jobs via crontab -e appears to have no effect. I feel like I must have missed something, so any help would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![waffles](https://avatars.discourse-cdn.com/v4/letter/w/67e7ee/32.png) [@waffles](https://community.passbolt.com/u/waffles)\
**Post date:** [November 21, 2019, 1:20am UTC](https://community.passbolt.com/t/email-cron-job-is-never-executed-docker-passbolt-2-11-0-debian/2211/2 "2019-11-21T01:20:02Z")

</div>

Found the issue and leaving the resolution here for posterity. This container was running on an AWS server, and apparently, the problem does manifest there. See [here](https://stackoverflow.com/questions/43323754/cannot-make-remove-an-entry-for-the-specified-session-cron) for details. Commenting out the module pam\_loginuid.so line and restarting cron fixed the problem.

It would be nice to have the Dockerfile update /etc/pam.d/cron as described in the stackoverflow link to avoid this problem.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex031/uploads/passbolt/original/2X/b/bee7d3f9329f668000d46e9fcb2e5db1e9d31348.svg) [@system](https://community.passbolt.com/u/system)\
**Post date:** [November 26, 2019, 1:20am UTC](https://community.passbolt.com/t/email-cron-job-is-never-executed-docker-passbolt-2-11-0-debian/2211/3 "2019-11-26T01:20:05Z")

</div>

Closed on November 26, 2019, 1:20am UTC

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.
