Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get the date/time that Sitecore last published

Simple question, I think: is there a value, either in the API or the Web database, that will tell me the last time content was published using sitecore? It looks like there's an "Updated" column in the "Items" table that might do this, but I'd like to be sure. I don't need to know individual items, just the last time any content was published.

like image 745
Josh C Avatar asked Dec 15 '22 19:12

Josh C


1 Answers

Iff (that's if and only if) the publish is a full site publish or an incremental publish, Sitecore will record that date to the database, and it can be retrieved from the master DB using

Database.Properties.GetLastPublishDate(Database target, Language language)

Otherwise, if you want the date for any publish, you're probably going to need to create a publish pipeline processor to record that date somewhere.

like image 194
nickwesselman Avatar answered Dec 28 '22 10:12

nickwesselman