sharepoint 2007 - Trying to install SPJobDefinition; not showing up in list -


I am trying to follow and similar tutorials have derived me custom SPJobDefinition and found a feature. Definition does nothing, because I'm just trying to set it up. FeatureActivated has the following code:

  // Get site collection in which it is being activated SPSite siteCollection = (SPSite) properties.Feature.Parent; // Make sure that the job is not already registered foreach (SPJobDefinition jobDefinition in siteCollection.WebApplication.JobDefinitions) if (jobDefinition.Name.Equals (TIMER_JOB_NAME)) jobDefinition.Delete (); // Create Job Form 40EscalationTimer timerJob = New Form40EscalationTimer (TIMER_JOB_NAME, siteCollection.WebApplication, null, SPJobLockType.Job); SPMinuteSchedule schedule = new SPMinuteSchedule (); Schedule.BeginSecond = 0; Schedule.andsecond = 59; Schedule.Interval = int.Parse (ConfigurationManager.AppSettings ["Form40EscalationJobIntervalMinutes"]); TimerJob Schedule = schedule; TimerJob.Update (); // Install the job - not basically here, http://www.codeguru.com/cpp/misc/misc/microsoftofficeoutlook/print.php/c14133__1/ site link Web Applications Job Definition. Attempted to add (timerbob); SiteCollection.WebApplication.Update ();  

What am I missing? It all keeps fine, and this feature activates fine, but it does not appear in the list of job definitions!

Code is used when preparing for a timer job, the difference is that I have a web In the application, you have a site collection (I have your facility scope site):

  Public override feature feature disabled (SPFeatureReceiverProperties properties) {SPWebApplication application = properties. SPWebApplication as FEature.Parent; // Make sure the job is not a foreach registered already (application in SPEJB Definition job. Job Definition) {if (job.Name == ARCHIVE_JOB_NAME) job.Delete (); } // Install the job NewsArchiverTimerJob archiveJob = New NewsArchiverTimerJob (ARCHIVE_JOB_NAME, app); SPMinuteSchedule schedule = new SPMinuteSchedule (); Schedule.BeginSecond = 0; Schedule.andsecond = 59; Schedule. Interval = 30; Collection job Schedule = schedule; Collection job Update ();}  

Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -