.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Can I create a timer job to run a custom code everyday?

Posted By:      Posted Date: October 07, 2010    Points: 0   Category :SharePoint

Hello guys,

I have to run some calculations at sometime everyday through code in sharepoint. So How can i make sure that this code runs at particular time to perform those calculations.

If you guys know anything, let me know.


View Complete Post

More Related Resource Links

Create a Outlook Task from Custom WebPart in Code



I have a requirement to create a Outlook Task , from a custom webpart through code .

Is this possible?

has any body tried this , if yes can you please give me an insight on how to acheive it.

Some sample Code would be highly appreciated.



Custom SharePoint Timer Job doesn't run after changing code and restart timer services.

Hi We are facing an issue that our custom SharePonit Timer Job doesn't run after a changing the code. First, we developed and deployed a timer job. It worked fine for a few days, then we detected a memory leak and killed the OWSTIMER.EXE. (Maybe we should uninstall the timer job and restart the timer services nicely). We fixed the problem, redeployed the fix as a feature (assemblies are re-GACed ...) to our small SharePoint farm (one web server, one services server), restarted the SharePonit Timer Services. Now we can see the time job in Timer Job Definition in Central Admin but the job never runs (Since it doesn't run, the timer job status page doesn't have any info about it). We tried the same process in a dev environment with SharePoint signle box installation. The timer job just works fine. I did some search on Internet and followed some instruction to clear the cache from "C:\ProgramData\Microsoft\SharePoint\Config\1d50d73c-9bf1-4444-85a9-910ed050d1bf" by 1. Remove all the xml2. Clear the cache.ini with "1".3. restart the timer services. It still doesn't fix the problem.Please advise what else I can do. I even rename the timer job and redeploy it. It doesn't help. I checked the even log and SharePoing log and couldn't see anything wrong. Our OS is W2K8.         public override void FeatureActivated(SPFeatureReceiverProperties properties)        { 

create custom timer job to start a workflow


i have created a project with visual studio, to start every day a workflow on every item in a list.

when i place my code in a webpart and i run the code on 1 item, the workflow will start normally.

when i place my code in the  timer job in the execute method, the timer job will finnish normally but there will be not workflow started.


public override void Execute(Guid contentDbId)

            SPWorkflowManager objWorkflowManager = null;
            SPWorkflowAssociationCollection objWorkflowAssociationCollection = null;

            using (SPSite mySiteCollection = new SPSite(siteurl))
                using (SPWeb mySite = mySiteCollection.OpenWeb())

Create array in custom code


I have a parameter that displays a drop down list of values that the user can select from. The parameter displays the description, but the sql table is keyed by a code value, that I don't  want to show the user, I though about building an arrary of code values in the custom code, but since I can't reference a data set inside the custom code, what would be the best way to build an array or is there a better way of showing the description but hide the code value from the user.




Daniel J. Plocica

Create/add table from code to database



I create table:

                  DataSet data=new DataSet();

                  DataTable myTable = new DataTable("NewTable");

                   DataColumn[] keys = new DataColumn[1];

                   // create column
                   keys[0] = new DataColumn();
                   keys[0].DataType = System.Type.GetType("System.String");
                   keys[0].ColumnName = "PointID";
                   myTable.Columns.Add(keys[0]);    &nb

Wicked Code: Craft Custom Controls for Silverlight 2


If you're unfamiliar with Windows Presentation Foundation (WPF), building that first Silverlight custom control can be a daunting experience. This article walks through the process.

Jeff Prosise

MSDN Magazine August 2008

Silverlight: Create a Custom Expression Encoder Publishing Plug-In


Laurence Moroney demonstrates how to employ the Expression Encoder plug-in APIs by building and debugging a simple FTP upload plug-in.

Laurence Moroney

MSDN Magazine February 2008

Fuzz Testing: Create a Custom Test Interface Provider for Team System


Dan Griffin shows the extensibility of Visual Studio 2005 Team Edition for Software Testers by discussing the modification of the existing Test Interface Provider sample in the latest Visual Studio SDK and implements Fuzz Testing.

Dan Griffin

MSDN Magazine November 2007

Smarter Art: Create Custom SmartArt Graphics For Use In The 2007 Office System


SmartArt incorporates a gallery of templates and predefined shapes that can quickly be inserted and configured in your Microsoft Office documents. Find out how.

Janet Schorr

MSDN Magazine February 2007

Desktop Security: Create Custom Login Experiences With Credential Providers For Windows Vista


Why is a change to the Windows logon plug-in interface so exciting? Because with credential providers you can customize the logon experience for your users.

Dan Griffin

MSDN Magazine January 2007

The Perfect Host: Create And Host Custom Designers With The .NET Framework 2.0


The .NET Framework 2.0 introduces a set of classes that can be used to host designers right out of the box. With the understanding of designers you'll glean from this article, you'll be ready to host them in your own apps.

Dinesh Chandnani

MSDN Magazine March 2006

C#: Create Elegant Code With Anonymous Methods, Iterators, And Partial Classes


In this article Juval Lowy describes how exciting new features in Visual Studio 2005, that will improve your overall productivity compared to the first version of C#, so you can write cleaner code faster.

Juval Lowy

MSDN Magazine Visual Studio 2005 Guided Tour 2006

Custom Cultures: Extend Your Code's Global Reach With New Features In The .NET Framework 2.0


The upcoming Microsoft .NET Framework 2.0 adds a number of globalization features that address the important issues of extensibility, standards support, and migration. Here authors Michael Kaplan and Cathy Wissink explain what these features mean to your globalization effort.

Michael Kaplan and Cathy Wissink

MSDN Magazine October 2005

Data Binding: Give Your Everyday Custom Collections a Design-Time Makeover


In this article, Paul Ballard shows how you can provide data binding support for your custom collections to enable sorting, searching, and editing in as simple a manner as possible. In addition, he shows how to make all of these features available in the Windows and Web Forms Designers, just like an ADO.NET DataSet.

Paul Ballard

MSDN Magazine August 2005

C# 2.0: Create Elegant Code with Anonymous Methods, Iterators, and Partial Classes


C# 2.0 introduces a wealth of exiting new features, such as generics, iterators, partial classes and anonymous methods. While generics are the most talked-about feature especially for former classic C++ developers, the rest of the new features are important additions to your .NET development arsenal, enhancing power and improving overall productivity. This article is dedicated to all the new C# 2.0 capabilities besides generics to give you a good overall picture of the upcoming features.

Juval Lowy

MSDN Magazine May 2004

Code Name Avalon: Create Real Apps Using New Code and Markup Model


The presentation subsystem in the next version of Windows, code-named "Longhorn," offers powerful new capabilities to developers. This subsystem, code-named "Avalon," allows developers to take advantage of its capabilities through a new markup language code-named "XAML." In addition, modern object-oriented programming languages such as C# and Visual Basic .NET can be used to tie everything together. Because most applications written to Avalon will probably be a mix of XAML and programming code, this article discusses XAML tags used to control page layout along with the procedural code written to respond to events.

Charles Petzold

MSDN Magazine January 2004

.NET Remoting: Create a Custom Marshaling Implementation Using .NET Remoting and COM Interop


The .NET Framework offers several methods for customizing the presentation of native .NET and COM object types. One such technique, custom marshaling, refers to the notion of specializing object type presentations. There are times, like when a legacy COM component needs to implement a new interface or when you need to make calls across process or machine boundaries, when custom marshaling saves the day. Elements of COM Interop permit the customizing of COM types while .NET Remoting offers the developer the ability to tailor native .NET types. This article examines these techniques.

Jim Sievert

MSDN Magazine September 2003

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend