Advice how to implement content expiry notifications
Hi,
we want to implement some content expiry notifications that will fire off emails to certain users when published content reaches a certain age, e.g 6 months and then 7 months.
Can someone please point me in a good direction of how to achieve this in an efficient way,
An overview question though please - how do you get the code to run regularly so it auto checks and reports back, won't it have to run everyday to check what content has expired, or does your methods only run when your custom page is opened?
You need to write a scheduled task to call the end point you can either do it with umbraco task scheduler you can setup in umbracoSettings.config file however i would recommend using windows task scheduler to call the end point.
The umbraco scheduler is tied in with .net website and if site is inactive that scheduler will be inactive and you will get sporadic executions. Use windows scheduler as that is consistent in execution.
Advice how to implement content expiry notifications
Hi,
we want to implement some content expiry notifications that will fire off emails to certain users when published content reaches a certain age, e.g 6 months and then 7 months.
Can someone please point me in a good direction of how to achieve this in an efficient way,
Thanks a lot!
Damon,
I did this a long time ago with older Umbraco version see https://our.umbraco.org/projects/backoffice-extensions/cogworks-cogpagereview/ there is link to source code as well, as I say its umbraco<7 so you may have to fiddle with it a bit however you can see how I did it including firing out emails.
Regards
Ismail
Damon,
This is more recent code where the searching for expired content is via lucene instead of xml https://bitbucket.org/thecogworks/page-review/overview again its
Regards
Ismail
HI Ismail,
thanks for that, I will look into this.
An overview question though please - how do you get the code to run regularly so it auto checks and reports back, won't it have to run everyday to check what content has expired, or does your methods only run when your custom page is opened?
Thanks a lot
Damon,
You need to write a scheduled task to call the end point you can either do it with umbraco task scheduler you can setup in umbracoSettings.config file however i would recommend using windows task scheduler to call the end point.
The umbraco scheduler is tied in with .net website and if site is inactive that scheduler will be inactive and you will get sporadic executions. Use windows scheduler as that is consistent in execution.
Regards
Ismail
is working on a reply...