I have created a custom timer job. I deploy it with a feature that has a WebApplication scope. The Execute() method in my job definition class keeps throwing errors. I'm trying to get a reference to the Web Application in the Execute method, but nothing seems to work. I've tried several methods of getting this reference:
SPWebApplication webapp = this.WebApplication;
and
SPWebApplication webapp = this.Parent as SPWebApplication;
both of these are returning null.
Any clues what the issue could be?