locked
Review job definition link in CA - Monitoring - Timer Jobs error RRS feed

Answers

  • I got this error when open the Review job definition link in CA - Monitoring - Timer Jobs

    or this url

    http://servername/_admin/ServiceJobDefinitions.aspx

    ==================

    Error

    Operation is not valid due to the current state of the object.

     Troubleshoot issues with Microsoft SharePoint Foundation.

    Correlation ID: 9cc77ad5-807b-4ecb-b5c9-dcc21f7a9a85

    ===============

    If anyone had seen this error and know the cause or solution, please advice

    Thanks

    Swanl

     

    The ServiceJobDefinitions.aspx page may fail with the "Operation is not valid due to the current state of the object" message because some timer jobs are in broken state. Use PowerShell cmdlet Get-SPTimerJob to review you existing timer jobs, and use the Delete() method on a job object to get rid of the bad guys there. 

    This command will enumerate the jobs that fail the ServiceJobDefinitions.aspx page, because it's not able to render jobs with null-valued DisplayName property:

    Get-SPTimerJob | where { $_.DisplayName -eq $null }

    Most likely the "bad guys" are timer jobs that were provisioned with errors (they might have null-valued DisplayName, some good value for the Schedule property, and NB! never been run actually - LastRunTime with weird value), e.g. as part of Service Application provisioning sequence. This might be a case, for example, when an attempt was made to provision User Profile Service Application via PowerShell on a machine with User Account Control (UAC) turned on, and without elevating the shell with Administrator privileges.

    So, recall what was the last thing that failed, find partly provisioned timer jobs (likely, with null value for the DisplayName property on the job object), delete them, and the ServiceJobDefinitions.aspx page will be fixed.

    Best regards,
    Ilya Belomutov

    • Edited by [MCM] Tuesday, February 15, 2011 2:31 PM added a PowerShell command useful for troubleshooting
    • Proposed as answer by Kriss Tariske Wednesday, April 18, 2012 12:12 AM
    • Marked as answer by swanl98 Wednesday, April 18, 2012 11:39 PM
    Tuesday, February 15, 2011 11:07 AM
  • Have you tried running IISRESET and restarting the WSS Timer Service?
    SharePoint Solution Architect, Developer
    Wednesday, December 15, 2010 6:01 AM

All replies

  • Have you tried running IISRESET and restarting the WSS Timer Service?
    SharePoint Solution Architect, Developer
    Wednesday, December 15, 2010 6:01 AM
  • I got this error when open the Review job definition link in CA - Monitoring - Timer Jobs

    or this url

    http://servername/_admin/ServiceJobDefinitions.aspx

    ==================

    Error

    Operation is not valid due to the current state of the object.

     Troubleshoot issues with Microsoft SharePoint Foundation.

    Correlation ID: 9cc77ad5-807b-4ecb-b5c9-dcc21f7a9a85

    ===============

    If anyone had seen this error and know the cause or solution, please advice

    Thanks

    Swanl

     

    The ServiceJobDefinitions.aspx page may fail with the "Operation is not valid due to the current state of the object" message because some timer jobs are in broken state. Use PowerShell cmdlet Get-SPTimerJob to review you existing timer jobs, and use the Delete() method on a job object to get rid of the bad guys there. 

    This command will enumerate the jobs that fail the ServiceJobDefinitions.aspx page, because it's not able to render jobs with null-valued DisplayName property:

    Get-SPTimerJob | where { $_.DisplayName -eq $null }

    Most likely the "bad guys" are timer jobs that were provisioned with errors (they might have null-valued DisplayName, some good value for the Schedule property, and NB! never been run actually - LastRunTime with weird value), e.g. as part of Service Application provisioning sequence. This might be a case, for example, when an attempt was made to provision User Profile Service Application via PowerShell on a machine with User Account Control (UAC) turned on, and without elevating the shell with Administrator privileges.

    So, recall what was the last thing that failed, find partly provisioned timer jobs (likely, with null value for the DisplayName property on the job object), delete them, and the ServiceJobDefinitions.aspx page will be fixed.

    Best regards,
    Ilya Belomutov

    • Edited by [MCM] Tuesday, February 15, 2011 2:31 PM added a PowerShell command useful for troubleshooting
    • Proposed as answer by Kriss Tariske Wednesday, April 18, 2012 12:12 AM
    • Marked as answer by swanl98 Wednesday, April 18, 2012 11:39 PM
    Tuesday, February 15, 2011 11:07 AM
  • <cite class="fn">Kriss Tariske</cite> says: Your comment is awaiting moderation.

    Full instructions i created:

    The ServiceJobDefinitions.aspx page may fail with the “Operation is not valid due to the current state of the object” message because some timer jobs are in broken state. Use PowerShell cmdlet Get-SPTimerJob to review you existing timer jobs, and use the Delete() method on a job object to get rid of the bad guys there.

    This command will enumerate the jobs that fail the ServiceJobDefinitions.aspx page, because it’s not able to render jobs with null-valued DisplayName property:

    Get-SPTimerJob | where { $_.DisplayName -eq $null }

    Most likely the “bad guys” are timer jobs that were provisioned with errors (they might have null-valued DisplayName, some good value for the Schedule property, and NB! never been run actually – LastRunTime with weird value), e.g. as part of Service Application provisioning sequence. This might be a case, for example, when an attempt was made to provision User Profile Service Application via PowerShell on a machine with User Account Control (UAC) turned on, and without elevating the shell with Administrator privileges.

    So, recall what was the last thing that failed, find partly provisioned timer jobs (likely, with null value for the DisplayName property on the job object), delete them, and the ServiceJobDefinitions.aspx page will be fixed.

    Get-SPTimerJob | out-file –filepath “c:\timerjobs.txt”

    http://myserver:55555/_admin/ServiceJobDefinitions.aspx – Does not display

    Get-SPTimerJob | where {$_.displayname -like “”} | fl | out-file –filepath “c:\timerjobs.txt”
    (Creates the txt file with the jobs that do not work)

    Get-SPTimerJob | where { $_.name -like “*job name” } |ft id,name
    (Not really needed, as text file above will display thiws, simply copy/paste into line below the job id number.)

    $job = Get-SPTimerJob -id putidenumberhere

    $job.Delete()

    Pretty swift, fixed the issue.

    Kriss Tariske
    Redlands. CA


    Kriss Tariske esri/systems admin

    Wednesday, April 18, 2012 12:13 AM
  • Ilya

    I am really sorry that i have overlooked this and did not reply util now.  I appreciate the clearly explaination and the solution you had given.

    Thanks so much


    Swanl

    Wednesday, April 18, 2012 11:39 PM
  • Kriss - thanks for that!

    Wasn't so swift for me, I had about 20 jobs to delete... but the export to a file line:

    Get-SPTimerJob | where {$_.displayname -like ""} | fl | out-file –filepath "c:\timerjobs.txt"

    and then going through the file for each Job ID, and then adding in the ID and doing $job.Delete() one by one eventually got it back to where the Timer Job page would load.  Thanks, again!


    • Edited by navyjax2 Friday, March 1, 2019 10:11 PM
    Friday, March 1, 2019 10:09 PM