PrepAway - Latest Free Exam Questions & Answers

Which method of the timer job should you override?

A company uses SharePoint team sites for their projects, which last for a month.
At the end of every month the project site must be archived and moved to a backup web application. The
company plans to create a timer job.
You need to write custom code that will move the site from the production web application to the archived web
application.
Which method of the timer job should you override?

PrepAway - Latest Free Exam Questions & Answers

A.
RunNow

B.
Execute

C.
Update

D.
Provision

Explanation:
Execute
Executes the job definition on the local machine and is intended to be used only by the timer service.
Note: After you create the constructors, you must override the Execute method of the SPJobDefinition class
and replace the code in that method with the code that your job requires.
Incorrect:
A: RunNow
Schedules the job for immediate execution.
C: SPJobDefinition.Update methodCauses the job definition to save its state and propagate changes to all machines in the farm.
D: Provision
Makes the changes to the local server that are needed before the object can be used.
Creating Timer Jobs in SharePoint 2010 that Target Specific Services


Leave a Reply