SharePoint Quick Tip – execadmsvcjobs

A quick tip (as the title of this post states) for SharePoint, useful for both administrators and developers. Often in these roles, you are working wither within Central Administration, deploying, retracting, and removing solutions from your environment.

In doing so, you can either specify a time for these jobs to be run, then you definitely have to wait, or, you just need to wait for the SharePoint Timer Service to run these jobs for you. Or, you do have the option of firing up the command prompt, and running

stsadm -o execadmsvcjobs

That is all well and good, but, wouldn’t it be easier just to click a button? That is what this quick tip is all about. The solution? Just create a batch file to do this for you, and drop it on the quick-launch for easy access.

If you are unfamiliar with creating batch files, here is how to accomplish this.

  1. Open up notepad
  2. Paste in the following (be sure to change the path to your stsadm executable on the first line it it is not located in the same place, for example, on drive D rather than C)
  3. @SET STSADM="c:\program files\common files\microsoft shared\web server extensions\12\bin\stsadm.exe"
    @ECHO.
    @ECHO Executing Jobs...
    %STSADM% -o execadmsvcjobs
  4. Save the file as execadmsvcjobs.bat (be sure to select All Types (*.*) from the Save as type drop-down dialog, so .txt is not appended to the filename, resulting in execadmsvcjobs.bat.txt)
  5. Once saved, browse to the location where you have just saved this file, right click on it, and choose Send To > Desktop (create shortcut) from the context menu.
  6. Drag the shortcut icon into your Quick Launch bar
  7. Click on it to run!

Makes the process quick and simple. If you have other batch scripts which you run frequently, it may even be useful to have a toolbar itself setup to group these all together for easy access.

 

Advertisement

About Geoff Varosky
Geoff Varosky is a Senior Architect for Insight, based out of Watertown, MA. He has been architecting and developing web based applications his entire career, and has been working with SharePoint for the past 15 years. Geoff is an active member of the SharePoint community, Co-Founder and Co-Organizer of the Boston Area SharePoint Users Group, co-founder for the Boston Office 365 Users Group, co-organizer for SharePoint Saturday Boston and speaks regularly at SharePoint events and user groups.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: