0

I have created a timer job with nothing inside as following:

public NCaseSyncJob()
    : base()
{

}

public NCaseSyncJob(string jobName, SPService service)
    : base(jobName, service, null, SPJobLockType.None)
{
    this.Title = "testing this";
}

public NCaseSyncJob(string jobName, SPWebApplication webapp)
    : base(jobName, webapp, null, SPJobLockType.ContentDatabase)
{
    this.Title = "testing this";
}

//http://sharepoint-kings.blogspot.com/2013/02/debugging-custom-sharepoint-timer-jobs.html
//Must restart timerservice after each deployment i.e  net stop SPTimerV4 and net start SPTimerV4
public override void Execute(Guid targetInstanceId)
{
}

This job works fine on development machine. When i deploy production and i go to Timer Jobs and run it, i get following error:

The Execute method of job definition TimerJob.NCaseSyncJob (ID a77e79bf-8300-46e5-a72f-fd92971304a9) threw an exception. More information is included below.

Object reference not set to an instance of an object.

I am using SharePoint 2010.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.