Logging to the SiteCron Last Run Log
I’ve worked with SiteCron quite a bit, but up until recently I hadn’t realised until recently that there was a field that should be used to track what happened when the Cron Job last ran, this field is the ‘Last Run Log’. I think it’s been around since version 2.18 but I didn’t notice it and couldn’t find any examples online which showed me how to use it: I wasn’t sure how to update it but as It is a Multiline text field I figured I could just be update it like any other Sitecore field like so: The script is pretty simple, it gets the Job Item and then finds the field and updates it. Thankfully SiteCron has some constants that can be used to help here. Notice how I’m appending to the field to build up an historic log of … Continue reading Logging to the SiteCron Last Run Log