Which code segment should you use?

You are writing a program that will periodically display activity on a Microsoft Windows SharePoint Services site.

For each job, you need to display the time that the job will run next.

Which code segment should you use?

You are writing a program that will periodically display activity on a Microsoft Windows SharePoint Services site.

For each job, you need to display the time that the job will run next.

Which code segment should you use?

A.
For Each job As SPJobDefinition In _
SPFarm.Local.TimerService.JobDefinitions
Console.WriteLine(“Job {0} will run at {1}”, job.DisplayName, _
job.Schedule.NextExecution(DateTime.Now))
Next

B.
For Each job As SPJobDefinition In _
SPFarm.Local.TimerService.JobDefinitions
Console.WriteLine(“Job {0} will run at {1}”, job.DisplayName, _
job.Schedule.NextExecution(DateTime.MinValue))
Next

C.
For Each job As SPRunningJob In _
SPFarm.Local.TimerService.JobDefinitions
Console.WriteLine(“Job {0} will run at {1}”, _
j ob.JobDefinitionTitle, _
job.JobDefinition.Schedule.NextExecution(DateTime.Now))
Next

D.
For Each job As SPJobDefinition In _
SPFarm.Local.TimerService.JobDefinitions
Console.WriteLine(“Job {0} will run at {1}”, _
job.JobDefinitionTitle, _
job.JobDefinition.Schedule.NextExecution(DateTime.MinValue))
Next



Leave a Reply 0

Your email address will not be published. Required fields are marked *