we are having a large farm, so workflow timer jobs are getting failed and nintex workflow timer job also not working as expected
as a clean up activity we need some scripts which can be ran on SQL or Powershell.
1) we want to terminate all the works which are error occurred in our environment
2) the workflows which are running more than 180 days and there is no action from any users that needs to be terminated.
3) Purging the nintex history list per sites rather than site collection DQL queries required.
above is for site collection.
–o PurgeHistoryListData -siteUrl http://site -lastActivityBefore 2015-10-10T12:29:14
Nwadmin.exe -o syncterminatedworkflows -url http://site
above commands are getting timed out
any recommendation for cleaning up activities will helpful.