SharePoint 2010

Manage Timer Jobs with PowerShell


In this small post lets see how you can configure Time Jobs using PowerShell. Lets say you want to enable “Activity Feed Job” which is by default “Disabled” on the Server.

a) First run below command to Get the job definition like Name, status, GUID

Command:

get-sptimerjob | sort-object name | where {$_.Name -match “ActivityFeedJob”}

Output:

image

Note down the Name of the job. Usually it will be <<User Profile Service Name>>_ActivityFeedJob

More details on Get-SPTimeJob visit http://msdn.microsoft.com/en-us/site/ff607914

b) Run below command to enable Time job

Command:

Enable-SPTimerJob -Identity <<Name of Job captured in step a>>

Output:

image

More details on Enable-SPTimerJob visit http://msdn.microsoft.com/en-us/site/ff607892

c) Set timer job- Schedule a time job now after it is enabled

Command:

Set-SPTimerJob “upa_ActivityFeedJob” -schedule “Every 30 minutes between 0 and 59”

Output:

image

More details on Set-SPTimeJob visit  http://msdn.microsoft.com/en-us/site/ff607916

that’s it

3 thoughts on “Manage Timer Jobs with PowerShell

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s