For SharePoint 2007 I had a need to write a console application that fires the Immediate Alerts timer job manually. The Immediate Alerts timer job executes every 5 minutes by default to send out the email alerts setup by users in SharePoint. For most cases, simply changing the interval of the timer service with stsadm would suffice. TechNet has instructions for seting the interval per site: In my case I needed to do some debugging and used a custom console application instead and am posting it here to share. It can be repurposed to any of the SharePoint timer jobs, but used the “job-immediate-alerts” job as an example.

The application can be run simply by running the compiled executable. If you desire to capture the output, you can simply do so by specifying the output be directed to a file rather than the screen:

You can download my source code here:

Happy Coding!

Pin It on Pinterest

Share This
%d bloggers like this: