Farm Based Custom Timer Job Feature
-
09-12-2019 - |
Question
I am trying to create a custom timer job where feature is farm scoped and will run on a farm level, I am not able to find any decent tutorial that tells how to create a farm based custom timer job feature.
I am able to look at few Web Application based custom timer job features, but they look different, e.g. this one..
Web Application based Custom Timer Job Feature
In following Piece of code, what should I put instead of web application as I want my feature to run on a farm not a web application :S
public TaskLoggerJob (string jobName, SPWebApplication webApplication)
: base (jobName, webApplication, null, SPJobLockType.ContentDatabase) {
this.Title = "Task Logger";
}
there is another constructor I find but dunno how to use it
What is Service and which one can I use ..
Solution
There is no farm level timer job. A custom timer job will only be installed on Web application/Site Collection level. So it's impossible to deploy a custom timer job definition on farm level.
Edit: But, you can have a custom timer job code which is deployed to the farm but it is installed/register on a Web Application level.