如何从命令行重新启动SharePoint计时器服务?
净停止“Windows SharePoint Services计时器”
networking启动“Windows SharePoint Services计时器”
SharePoint 2010:
net stop SPTimerV4 net start SPTimerV4
我意识到OP正在请求命令行解决scheme,但使用PowerShell(以pipe理员身份运行),重新启动计时器服务就像运行一样简单:
restart-service sptimerv4
SharePoint 2013: 净停止SPTimerV4 / 净启动SPTimerV4
SharePoint 2007: 净停止SPTimerV3 / 净启动SPTimerV3
SharePoint 2003: 净停止SPTimer / networking启动SPTimer
而对于所有机器,SP2010 / 2013都要这样做:
$farm = Get-SPFarm $farm.TimerService.Instances | foreach { $_.Stop(); $_.Start(); }
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