100 likes | 271 Views
Building and Debugging SharePoint Timer Jobs. July 2013. Agenda. Introductions. Timer Job Overview. Example Walkthrough. Discussion. Wrap-Up & Next Steps. John Ramminger. Principal Consultant, SharePoint Development Team Lead. Email: JohnR@Intellinet.com. Twitter: @ JohnRam.
E N D
Building and Debugging SharePoint Timer Jobs July 2013
Agenda Introductions Timer Job Overview Example Walkthrough Discussion Wrap-Up & Next Steps
John Ramminger Principal Consultant, SharePoint Development Team Lead Email: JohnR@Intellinet.com Twitter: @JohnRam Linked In: http://linkedin.com/in/JohnRamminger
Timer Job Overview • Scheduled tasks that run in the background of a SharePoint Farm • Can be run scheduled to run from once to yearly • Microsoft.SharePoint.SPDailyScheduleMicrosoft.SharePoint.SPHourlyScheduleMicrosoft.SharePoint.SPMinuteScheduleMicrosoft.SharePoint.SPMonthlySchedule • Microsoft.SharePoint.SPYearlySchedule • Microsoft.SharePoint.SPOneTimeSchedule • Can be pinned to one server in a farm or allowed to run on all application and web front end servers. • Have built in administration pages to monitor and update the timer jobs and their schedules. • Run under one windows process called OWSTIMER.EXE
Custom SharePoint Timer Job Examples 1 Synchronize Data Between SharePoint and External Systems or other SharePoint Farms Complete processes that run to long to complete via other methods (site provisioning, multiple workflows ) 2 Start Workflows based on item state or time stamp 3 Cleanup items that need to be removed. (Cache Document Library) 4 Notification System that is based on custom queries to only notify users when specific criteria is met, rather than every time an item is updated. 5
Timer Job Example Overview • Custom Timer Job and Configuration List allows for customization by the SharePoint Administrator. • Uses common components to ensure flexibility. • Custom Notifications and Recycling of Items. • Application Page allows for easy debugging of solution.
Time for the Good Stuff! Code DEMO and Walk Through
Tools Used in Demo Example • These tools allow me to increase my productivity and decrease my frustration when developing for SharePoint. • SharePoint Log Viewer: http://sharepointlogviewer.codeplex.com/ • CKSDEV: http://bit.ly/1aF2EhL • CodeRush: https://www.devexpress.com/Products/CodeRush/ • SharePoint Manager: http://spm.codeplex.com/ • Code Rush Alternative: AutoHotKey
Hints for SharePoint Farm Development • Merge-SPLogFile
Q&A Time • John Ramminger (JohnR@Intellinet.Com) • @JohnRam on Twitter • Download the Example Timer Solution Here: • http://sdrv.ms/1e83UgQ Thank you for your time!