using System;using System.Collections.Generic;using System.Linq;using System.Text;using Microsoft.SharePoint;using Microsoft.SharePoint.Administration; namespace GetJobHistory{ class Program { static void Main(string[] args) { foreach (SPService service in SPFarm.Local.Services) { if (service.DisplayName == "My Sample Service") { Console.WriteLine("Service Name : "+ service.DisplayName); Console.WriteLine("############################################################"); foreach (SPJobHistory entry in service.JobHistoryEntries) { Console.WriteLine("Job Definition Title - " + entry.JobDefinitionTitle + " : Status - " + entry.Status + " : Start Time - " + entry.StartTime); } Console.ReadLine(); } } } }}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Administration;
namespace GetJobHistory
{
class Program
static void Main(string[] args)
foreach (SPService service in SPFarm.Local.Services)
if (service.DisplayName == "My Sample Service")
Console.WriteLine("Service Name : "+ service.DisplayName);
Console.WriteLine("############################################################");
foreach (SPJobHistory entry in service.JobHistoryEntries)
Console.WriteLine("Job Definition Title - " + entry.JobDefinitionTitle + " : Status - " + entry.Status + " : Start Time - " + entry.StartTime);
}
Console.ReadLine();
You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$20
For Premium members:
$45
For Elite members: