简体   繁体   中英

SharePoint 2016 some Timer Jobs run time n/a

I'm helpless... Since couple of weeks looking for a solution. Some TimerJobs (system jobs and custom) in my migrated SharePoint farm won't be executed. Migrated from 2010, over 2013 to 2016. Last run time is: N/A or via powershell 01.01.0001 00:00:00

I spend a lot of time to look for a solution, and already did the following:

  • Restarted timer service
  • Restarted all servers
  • iis reset
  • Cleared SharePoint configuration cache
  • Tried "Start-SPAdminJob -verbose", but it fails (also when I do "net stop SPAdminV4 / net start SPAdminV4")
  • Started SharePoint Configuration Wizard
  • Redployed the wsp and reactivated (for a custom timer job)
  • Checked service accounts

I'm also wondering about that some of them have also no web application associated. Is this normal? Web application: N/A

Is there someone with an idea? Thanks for any help.

try shell

 $server=Get-SPServer -Identity "name" 
$ts = $server.ServiceInstances | ? { $_.GetType().Name -like "*sptimerservice*" } | Select -First 1
$ts.AllowContentDatabaseJobs = $true
$ts.AllowServiceJobs = $true
$ts.Update()

About the custom jobs it may be related to missing deployment steps, like WSPs installation (ex. Compatibility Level or something else) or even feature activation to 'attach' it to a web application, service instance or server. Remembering that we have a sort of 'scopes' that must be checked during time job development. This is not new, but an excellent material:

https://www.red-gate.com/simple-talk/dotnet/.net-tools/a-complete-guide-to-writing-timer-jobs-in-sharepoint-2010/

About the system (native) jobs, I recommend you to give us an example, so we may check the SharePoint 2016 TimerJobs reference list:

https://docs.microsoft.com/en-us/sharepoint/technical-reference/timer-job-reference-for-sharepoint-server-2016

After checking those requirements, you have a way to start some stucked jobs (or force them to run immediately), using the following commands on your SharePoint shell:

net stop spadminv4
stsadm -o execadmsvcjobs
net start spadminv4

Reference: https://technet.microsoft.com/pt-br/library/cc262783(v=office.12).aspx

And one last shot - check if you have pending administrative changes, like running PSConfig. Central Admin Health Analyzer is your best friend ;)

Bonus: about custom timer jobs, please always be sure that some features may require the Microsoft SharePoint Foundation Web Application service started on CA Server, to make custom timer jobs available under Central Admin:

https://docs.microsoft.com/en-us/SharePoint/administration/service-deployment-planning

"This service provides web server functionality. It is started by default on web servers. Custom features scoped to web applications may not display in Central Administration as intended if this service is not started on the server running Central Administration and if the feature cannot be deployed globally."

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM