I would like to update an entry after it has expired via a plugin. Is there an event that I can use to do this when using Craft 2?

1 Answer 1


There is no event for this and it would not be possible via event since no one is executing any scripts. Unless there is a request there is no way for PHP to execute code on its own so you need to create a cronjob or a Craft task and execute your functions when someone visits the site.

I would create a cronjob that executes hourly and search for expired entries in order to find them. You can store a value in a field that is not in the layout of the model to mark it as "handled"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.