You cannot.
When Sitecore executes any job, it runs <job>
pipeline defined in Sitecore.config
(or web.config
in older versions). This pipeline has SignalStart
and SignalEnd
processors, but the only thing they do is logging the information that job started or finished:
public static void SignalStart(JobArgs args)
{
Job job = args.Job;
job.Status.LogInfo("Job started: {0}", job.Name);
}
public static void SignalEnd(JobArgs args)
{
Job job = args.Job;
string str = string.Empty;
if (job.Status.Processed > 0L)
str = job.Status.Processed.ToString();
job.Status.LogInfo("Job ended: {0} (units processed: {1})", job.Name, str);
}
You can do what you need manually by analyzing the log files (see https://sitecore.stackexchange.com/a/1234/277 ) or you can add your own custom processors to the pipeline mentioned above and store this information in some other place / database / whatever suits you best.
<agent>
. Would you consider creating a Sitecore scheduled task? Then you could see the last run time on the schedule item: i.imgur.com/rtWIDkp.pngDatabase.Properties.GetLastPublishDate(Database target, Language language)