7

How do I restart SharePoint Timer Service from command line?

vitule
  • 172
  • 1
  • 1
  • 6

6 Answers6

14

SharePoint 2010:

net stop SPTimerV4
net start SPTimerV4
mgorven
  • 30,615
  • 7
  • 79
  • 122
Crop Duster
  • 141
  • 1
  • 2
9

net stop "Windows SharePoint Services Timer"

net start "Windows SharePoint Services Timer"

DanBig
  • 11,423
  • 1
  • 29
  • 53
9

I realize the OP is requesting a command-line solution, but using PowerShell (run as administrator), restarting the timer service is as easy as running:

restart-service sptimerv4

Sune Rievers
  • 193
  • 1
  • 4
5

SharePoint 2013: net stop SPTimerV4 / net start SPTimerV4

SharePoint 2007: net stop SPTimerV3 / net start SPTimerV3

SharePoint 2003: net stop SPTimer / net start SPTimer

Smile4ever
  • 105
  • 4
Brandon
  • 2,817
  • 1
  • 24
  • 28
2

And for SP2010/2013 to do this for all machines:

$farm = Get-SPFarm
$farm.TimerService.Instances | foreach { $_.Stop(); $_.Start(); }
  • What's about http://sharepoint.stackexchange.com/questions/110928/spadminv4-which-could-not-be-contacted-in-deployment?noredirect=1#comment109814_110928 ? View comments: From my findings the $farm.TimerService.Instances doesn't implement start() or stop(), so this shouldn't work at all. – Kiquenet Aug 06 '14 at 11:25
1
REM - Save this in a .BAT file and set up a scheduled task that runs it periodically.
REM - This will recycle the SharePoint Timer Service, and also log it in the Event Viewer. 

EVENTCREATE /T INFORMATION /L APPLICATION /ID 777 /D "Starting scheduled task: SP timer restart."

net stop SPTimerV4
net start SPTimerV4

if %ERRORLEVEL% == 0 (
  EVENTCREATE /T INFORMATION /L APPLICATION /ID 777 /D "Scheduled task: Restart succeeded for the SharePoint Timer Service (SPTimerV4 AKA 'SharePoint 2010 Timer').  ERRORLEVEL=%ERRORLEVEL%.  The restart is done by Scheduled Task, which runs the batch file: C:\_________________ every _ hours."
exit /b
) else (
  EVENTCREATE /T ERROR /L APPLICATION /ID 777 /D "Scheduled task: Restart failed for the SharePoint Timer Service (SPTimerV4 AKA 'SharePoint 2010 Timer').  ERRORLEVEL=%ERRORLEVEL%.  Please stop and restart the service manually and investigate the issue preventing the restart. The restart is done by Scheduled Task, which runs the batch file: C:\___________________ every _ hours."
)
EXIT
Ben
  • 11
  • 1