<p>I'm not aware of any existing plugins that would do this, and it seems pretty use-case specific.</p>

<p>You can do this with a <a href="https://craftcms.com/docs/plugins" rel="nofollow noreferrer">custom</a> <a href="https://pluginfactory.io" rel="nofollow noreferrer">plugin</a> and a cron job, though.</p>

<p>The cron job would run every 1/5/x minutes, hit an action in your plugin's controller and that action could get the entries in the section you're interested in, check the post date and decide what to do from there.</p>

CC BY-SA 3.0
2018-04-10T21:04:19.213Z
Brad, thank you for your response. I've come back to this feature request in the project. I have the cron job itself setup, and have the `businesslogic` plugin installed to help with getting a quick custom plugin running for this. However, I'm a bit confused with how to go about writing this action. For example, how would this action grab entries from section X, filter by expiration (within two weeks), and send to that entry author's email and the email of "veterinarian" entries attached to it??
Steven Thate
CC BY-SA 3.0
2017-05-11T21:34:53.217Z
2017-05-11T21:34:53.217Z
Brad Bell
<p>Entries in a particular section have expiration dates of up to one year away. The client would like to receive a notification email two weeks before this expiration date is reached.</p>

<p>Here's a bonus question: These entries are connected to another section of vets. Each vet entry will have an email field. Whatever vet is connected to the original entry in question (the one with the expiration field) also needs to receive this notification email.</p>

<p>Are there any existing plugins that allow this? I haven't found any yet.</p>

<p>Thanks!</p>

<entries><emails><expiration>
Sending an email before entry expires
# Sending an email before entry expires

(Asked by: username_0 on 2017-05-11)

Entries in a particular section have expiration dates of up to one year away. The client would like to receive a notification email two weeks before this expiration date is reached.

Here's a bonus question: These entries are connected to another section of vets. Each vet entry will have an email field. Whatever vet is connected to the original entry in question (the one with the expiration field) also needs to receive this notification email.

Are there any existing plugins that allow this? I haven't found any yet.

Thanks!

**Tags:** entries, emails, expiration

---

## 1 answers

### Answer by username_1 on 2017-05-11. Score: 2

I'm not aware of any existing plugins that would do this, and it seems pretty use-case specific.

You can do this with a [custom](https://craftcms.com/docs/plugins) [plugin](https://pluginfactory.io) and a cron job, though.

The cron job would run every 1/5/x minutes, hit an action in your plugin's controller and that action could get the entries in the section you're interested in, check the post date and decide what to do from there.

> **Comments:**
> **username_0**: Brad, thank you for your response. I've come back to this feature request in the project. I have the cron job itself setup, and have the `businesslogic` plugin installed to help with getting a quick custom plugin running for this. However, I'm a bit confused with how to go about writing this action. For example, how would this action grab entries from section X, filter by expiration (within two weeks), and send to that entry author's email and the email of "veterinarian" entries attached to it??  

---

