how to set time schedule programatically in timer jobs using sharepoint 2013(Farm soluation)

create one timer job in SharePoint 2013 and set timer job time 1 minutes in Event Receiver after deploy timer job in farm solution. and time jobs run for 15 minutes(SharePoint by default timer Job time set).

every 15 minutes timer job run but not perform my set minute schedule time in timer jobs.

  private bool CreateJob(SPWebApplication site)     {         bool jobCreated = false;         try         {             TimerJobDemo job = new TimerJobDemo(JobName, site);             SPMinuteSchedule schedule = new SPMinuteSchedule();             schedule.BeginSecond = 0;             schedule.EndSecond = 59;             schedule.Interval = 1;             job.Schedule = schedule;              job.Update();             job.RunNow();          }         catch (Exception)         {             return jobCreated;         }         return jobCreated;     } 

Replay

Category: custom timer job Time: 2016-07-29 Views: 0

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.160 (s). 12 q(s)