1

I have created a timer job and deployed to Sharepoint 2013 called "Timerjob Employee"

is it possible to modify my existing solution so I can create another timer job called "Timerjob Manager" (with minor differences to the original solution) and deploy to Sharepoint 2013 so I can see both jobs listed in Job Defitions in Central Administration?

0

Yes, it should work! but it will require to add another feature to the second timer job "Timerjob Manager" class.


In your case, I think if you have a minor change, so I prefers

To bundle the two timer job in only one, and manage the code logic using IF condition as the following:

If(Type= "Manager")
{
    DoSomething(true);
}
else
{
   DoSomething(false);
}
void DoSomething(bool flag)
 {
   // your code
 }

Or isolate it to another solution, or manage it in one solution as I above mentioned. it's up to you :)

  • thanks Mohamed. yes I ended up adding another feature. – qed59 Sep 5 '18 at 1:27
0

Each timer job maps to a unique class, create another class inherit from SPJobDefinition with unique Title just like you did as existing timer job(Copy&paste and modify the proper coding part, class name, job title, timer job schedule).

You should know this, while may helpful for your reference.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.