Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Can this be used to notify when an entry is expired (or about to be)? #5

Closed
swthate opened this issue Apr 6, 2018 · 1 comment

Comments

@swthate
Copy link

swthate commented Apr 6, 2018

Can this be used to notify a certain group of users when an entry is about to expire?

@riasvdv
Copy link

riasvdv commented Apr 7, 2018

It can for the notification part, but you'd have to trigger an event manually that the notification plugin can listen to because there is no built in Craft event that allows for this.

Basic steps that you'll have to do to implement this:

  • Create a console command that checks all the entries that are about to expire
  • Fire an event (either for each entry or for the collection of entries)
  • Attach a notification to this event
  • Run the console command in a cronjob that checks every so often

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants