Add-PSSnapin Microsoft.SharePoint.PowerShell # Virto Workflow Scheduler Job Name $vwsJobName = "VirtoMasterJobSettingsId" #Replace web application url to your web application url $webApplicationUrl = "http://yourwebapplicationurl" # Get job instance by id $job = get-sptimerjob -Identity $vwsJobName -WebApplication $webApplicationUrl if($job -ne $null) { Write-Host "Virto Workflow Scheduler job status: $($job.Status)" Write-Host "Virto Workflow Scheduler schedule interval: $($job.Schedule.Interval)" Write-Host "Virto Workflow Scheduler job last run time: $($job.LastRunTime)" Write-Host "Virto Workflow Scheduler schedule next runtime from now: $($job.Schedule.NextOccurrence([System.DateTime]::Now))" } else { Write-Error "Virto Workflow Scheduler job not found" } [reflection.assembly]::LoadWithPartialName("Virto.SharePoint.WorkflowScheduler") #Delete job if necessary if($job -ne $null) { Write-Host "Deleting Virto Workflow Scheduler job" $job.Delete() } Write-Host "Creating new instance of Virto Workflow Scheduler job" [Microsoft.SharePoint.SPSchedule] $schedule = [Microsoft.SharePoint.SPSchedule]::FromString("Every 10 minutes between 0 and 59") $wa = Get-SPWebApplication $webApplicationUrl $job = New-Object -typename "Virto.SharePoint.WorkflowScheduler.MasterJob" ($vwsJobName, $wa) $job.Name = $vwsJobName $job.Title = $vwsJobName $job.Schedule = $schedule $job.Update($true) Write-Host "Staring Virto Workflow Scheduler job" $job = Get-SPTimerJob -Identity $vwsJobName -webapplication $webApplicationUrl # | Start-SPTimerJob $job.RunNow(); Write-Host "Virto Workflow Scheduler new job status: $($job.Status)" Write-Host "Virto Workflow Scheduler new job schedule interval: $($job.Schedule.Interval)" Write-Host "Virto Workflow Scheduler new job last run time: $($job.LastRunTime)" Write-Host "Virto Workflow Scheduler new job schedule next runtime from now: $($job.Schedule.NextOccurrence([System.DateTime]::Now))"