Sharepoint 2016 and Nintex Workflows Scheduler never runs - sharepoint

The Nintex Workflow Scheduler will not run when attempting to start it from central administration. I have contacted Nintex multiple times about the issue in order to get this to run but without success, so I am hoping to reach out to others who might know more. Here is the background and already attempted fixes:
Our topology includes 2 wfe, 2 apps, 1 sql, and 1 workflow server. The wfe are not load balanced but we do have Nintex Licenses for both servers.
I have followed these steps provided by Nintex:
Enable the AllowServiceJobs property on the timer instance for the APP, WFE and Search Server
The following command should be run on each of the aforementioned servers.
(Get-SPFarm).TimerService.Instances | ?{$_.Server.Name -eq $env:COMPUTERNAME} | %{[Microsoft.SharePoint.Administration.SPTimerServiceInstance].GetMember("set_AllowServiceJobs", [Enum]::GetValues([System.Reflection.BindingFlags])).Invoke($_,$true) }
Update the timer service instances
Get-SPServiceInstance -All | ?{$.TypeName -match "Foundation Timer"} | %{$.Update()}
Restart the timer service instances
Get-SPServiceInstance -All | ?{$.TypeName -match "Foundation Timer"} | %{$.Server.Name;$.Stop();sleep 5;$.Start();sleep 5;"Done"}
Also followed this documentation: https://community.nintex.com/docs/DOC-1254-scheduled-workflows-and-the-nintex-workflow-scheduler-timer-job
and this: https://support.nintex.com/SharePoint/Workflow/2016/Scheduler_Job_Does_Not_Run_After_Upgrading_Nintex_Workflow_for_SharePoint_2016
I also bounced the entire farm.
I have also followed the additional information suggested by Nintex:
ADDITIONAL INFORMATION
If the issue remains unresolved, :
1. Ensure only ONE Nintex Scheduler Job exists in the farm & it is associated to the Central Administration web app.
2. Run the timer Job in Central Administration and via PowerShell.
3. Provide the ULS logs after performing the above recommended actions.
Are there any other suggestions on how I can get the Nintex Scheduled workflows to run on my environment?

Make sure that the workflow scheduler timer job is running only on WFE Servers.
I faced this kind of issue when the scheduler timer job was configured to run on APP server. I changed it to WFE server and restarted the timer services. It then started working.

Related

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://learn.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://learn.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."

Sharepoint 2013 Custom Timer Job running on development server but not on production server

I have developed a custom timer job for SharePoint 2013 in visual studio 2012 which sends email notifications. The issue is that it works fine on development server.
I have followed the following steps to debug it on the development server 1.) Deploy the timer job on respective site. 2.) Restart the timer service in services.msc 3.) Then is do attach to process OWSTIMER in visual studio. 4.) And finally Go to SharePoint 2013 Central administration->Monitoring->Review Job Definition and click on the respective timer job and say run now.
After doing this the breakpoint is hit in visual studio at the Execute() method. So in the development server it is running.
Now on the production server I cannot debug using visual studio so I have deployed the packaged solution(.wsp).
I can see the feature is activated in Site Collection Administration-> Site Collection Features.
Now on the production server I follow the following steps 1.)Restart the timer service in services.msc 2.)And finally Go to SharePoint 2013 Central administration->Monitoring->Review Job
Further to test whether the timer job is working on production server or not I had used PortalLog.LogString("Flow test1"); at the start of the Execute() method. Now this runs on the development server and I see the message in the SharePoint logs but on the production server I can't see "Flow Test1" in the logs after I click Run Now in central admin.
Can anyone suggest what is the issue and a possible solution?
It seems to me that there are two issues:
You should use other way for logging LoggingService should be preferred way. Use WriteEvent to write to EventLog or WriteTrace to write to ULS log.
Running job. Be sure that Owstimer.exe service on all web servers are restarted (can be done by this powershell script). I expect that you have correctly scheduled your job either in your powershell script or in your feature receiver.
Here are a few things to try:
Go to Central Administration and run the timer job from there. Then go to the job history page and check whether it finished successfully or not. If there was an error, you should see the error message from there. That will give you a clue on whats happening.
As Mazin said, restart the timer service in all servers. After deployment, the DLLs are cached by the process and you don't see your changes reflected.
Browse the SharePoint logs and search for an exception or error. You can narrow your search by selecting the timeframe on which your job ran. You can use the following PS script:
Get-SPLogEvent -StartTime "02/02/2014 11:00" -EndTime "02/02/2014 13:00" | Out-GridView
As stated here it seems your job assembly is not deployed in the GAC. Verify that the assembly is present there.

sharepoint solution won't deploy

I'm trying to deploy a SharePoint 2010 solution to our production environment, after starting the deployment process the deployment status keeps saying "Deploying".
At first I thought that the Timer jobs cache was clogging up, but after cleaning the cache and resetting the jobs counter the deployment still won't finish. I also double checked if the SharePoint Timer and Administration were down, but this wasn't the case.
I also reviewed the ULS logs but they don't seem to be holding any serious errors or problems.
Does anyone have a suggestion that might come in handy?
Do you have a different servers on WHich you are deploying your wsp ?
If yes, then check the timezone of that server.
Have a look at this link it may help you
ANother this you can try is :
Did you try the steps described above?
1) Run stsadm -o execadmsvcjobs on your CA server.
2) Run stsadm -o execadmsvcjobs on all the farm members that have stsadm.
4)Restart the Timer Service on all farm members.
5)If still not resolved, then try deleting the timer job that is causing the problem.

Sharepoint Timer job deployment issue while deploying Feature through the Visual Studio 2010

I created "Timer Job" in two ways,
1.Created a SharePoint Project through the Visual Studio 2010 and added several Features and webparts that's successfully deployed later i added the "Timer job" through the feature with the scope "Site" the timerjob not available in "Job Definitions".
2.When created a project with timer job feature only it's available in "Job Definitions".
I need to deploy the timer job along with other features as mention in first scenario
Regards,
Pavan.
You should deploy timer jobs in features scoped "Web Application". Please post the code you register your job with if this does not resolve your issue.
I've successfully deployed timer jobs to features scoped as tightly as 'Web' with no issues.
Doing it this way made it easier for me get the job settings to associate with specific list instances and I don't have to hard code any site collection URLs or whatever into the job code.
You still have to make sure you get it registered with the Web Application, and here's how I designed my feature activation for my web-scoped feature:
Public Overrides Sub FeatureActivated(ByVal properties As SPFeatureReceiverProperties)
Dim web As SPWeb = DirectCast(properties.Feature.Parent, SPWeb)
' Remove job if it exists.
DeleteJobAndSettings(web.Site.WebApplication)
' Create the job.
Dim job As New TimerJob_myClass(TimerJob_myClass.JobName, web.Site.WebApplication)
Also, even though it's a Web feature and shows up under 'Manage Features', it's better to mark it hidden. This type of feature can only be activated by running an stsadm command line from PowerShell. For example:
stsadm -o activatefeature -url http://intranet.contoso.local/ -id 01234567-AAAA-BBBB-CCCC-DDDDEEEEFFFF
You should run PowerShell as a user who has rights on the content database associated with the site your working with. The app pool that would have normally run the feature receiver code during a GUI activation does not have access to the config database and that's why it fails via GUI.
my problem solved in production by activating feature with the following powershell
Enable-SPFeature -identity "sample_Job Definition" -URL http://portaluat
my job definition scope was Site

Can I temporarily suspend SharePoint Server + IIS + SQL Server?

Is there a way to temporarily suspend / pause Sharepoint Server 2010, IIS and SQL Server services without killing them in Task Manager? I am not running VM or Hyper-V, so most of my resources are constantly used by those 3 major server applications.
It's just I am not always in SharePoint 2010. Ocasionally I'd like to play StarCraft 2 or work in AutoCAD.
Check out this nice little utility in Codeplex to start/stop all services of SharePoint 2010.
SharePoint 2010 Service Manager
You could write a script to stop and start the required services like this and place it in a .bat file:
net start service
net stop service
Just choose all the service names you need to start and stop and create two bat files one to stop and one to start

Resources