I have Timer Job being created in WebApplication level feature and when we deploy solution, this feature is getting reactivated (because it is of scope WebApp) and because it's reactivated, timer job is also getting recreated. I am deleting timer job in feature deactivation event handler and creating it in feature activation.

So when new job is created it loses its custom schedule change if any.

To fix this i have to save existing scheduler somewhere and when we recreate have to update the scheduler what it was previously.

Is there any better solution for this?

  • Maybe on feature deactivation event handler find the new schedule to copy over (if not null) to copy to the new timer job. – Mike Nov 11 '14 at 14:47
  • Saving existing scheduler and create a timer job with previously saved scheduler is one of the option which i know but would like to know any other approach where i do not have to write any additional code. – Ravi Khambhati Nov 11 '14 at 16:12

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.