{"action":"created","issue":{"url":"https://api.github.com/repos/sqlcollaborative/dbatools/issues/4103","repository_url":"https://api.github.com/repos/sqlcollaborative/dbatools","labels_url":"https://api.github.com/repos/sqlcollaborative/dbatools/issues/4103/labels{/name}","comments_url":"https://api.github.com/repos/sqlcollaborative/dbatools/issues/4103/comments","events_url":"https://api.github.com/repos/sqlcollaborative/dbatools/issues/4103/events","html_url":"https://github.com/sqlcollaborative/dbatools/issues/4103","id":365631820,"node_id":"MDU6SXNzdWUzNjU2MzE4MjA=","number":4103,"title":"Add -Wait parameter to Start-DbaAgentJob","user":{"login":"lanlanzeliu","id":31455555,"node_id":"MDQ6VXNlcjMxNDU1NTU1","avatar_url":"https://avatars1.githubusercontent.com/u/31455555?v=4","gravatar_id":"","url":"https://api.github.com/users/lanlanzeliu","html_url":"https://github.com/lanlanzeliu","followers_url":"https://api.github.com/users/lanlanzeliu/followers","following_url":"https://api.github.com/users/lanlanzeliu/following{/other_user}","gists_url":"https://api.github.com/users/lanlanzeliu/gists{/gist_id}","starred_url":"https://api.github.com/users/lanlanzeliu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lanlanzeliu/subscriptions","organizations_url":"https://api.github.com/users/lanlanzeliu/orgs","repos_url":"https://api.github.com/users/lanlanzeliu/repos","events_url":"https://api.github.com/users/lanlanzeliu/events{/privacy}","received_events_url":"https://api.github.com/users/lanlanzeliu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"niphlod","id":122119,"node_id":"MDQ6VXNlcjEyMjExOQ==","avatar_url":"https://avatars2.githubusercontent.com/u/122119?v=4","gravatar_id":"","url":"https://api.github.com/users/niphlod","html_url":"https://github.com/niphlod","followers_url":"https://api.github.com/users/niphlod/followers","following_url":"https://api.github.com/users/niphlod/following{/other_user}","gists_url":"https://api.github.com/users/niphlod/gists{/gist_id}","starred_url":"https://api.github.com/users/niphlod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niphlod/subscriptions","organizations_url":"https://api.github.com/users/niphlod/orgs","repos_url":"https://api.github.com/users/niphlod/repos","events_url":"https://api.github.com/users/niphlod/events{/privacy}","received_events_url":"https://api.github.com/users/niphlod/received_events","type":"User","site_admin":false},"assignees":[{"login":"niphlod","id":122119,"node_id":"MDQ6VXNlcjEyMjExOQ==","avatar_url":"https://avatars2.githubusercontent.com/u/122119?v=4","gravatar_id":"","url":"https://api.github.com/users/niphlod","html_url":"https://github.com/niphlod","followers_url":"https://api.github.com/users/niphlod/followers","following_url":"https://api.github.com/users/niphlod/following{/other_user}","gists_url":"https://api.github.com/users/niphlod/gists{/gist_id}","starred_url":"https://api.github.com/users/niphlod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niphlod/subscriptions","organizations_url":"https://api.github.com/users/niphlod/orgs","repos_url":"https://api.github.com/users/niphlod/repos","events_url":"https://api.github.com/users/niphlod/events{/privacy}","received_events_url":"https://api.github.com/users/niphlod/received_events","type":"User","site_admin":false}],"milestone":null,"comments":5,"created_at":"2018-10-01T20:34:38Z","updated_at":"2018-10-02T00:10:21Z","closed_at":null,"author_association":"NONE","body":"---\r\nname: Add -Wait parameter to Start-DbaAgentJob :bomb:\r\nabout: I would like to see Start-DbaAgentJob support a -Wait parameter so that it waits for the job to finish before returning context to the user/program\r\n\r\n---\r\n\r\n### Summary of new feature\r\n\r\n* I would like Start-DbaAgentJob to support a -Wait parameter so that it waits for the job to finish before returning context to the user/program.\r\n\r\n### Proposed technical details (if applicable)\r\n\r\n* It would be nice if this included the status of the job that completed, or produces an error if the job does not succeed.\r\n* It would also be nice to be able to include a second, optional parameter, to specify how often the loop checks for whether the job has completed.  If you expect a job to run in ~5 minutes, maybe 2-5 seconds is fine, but if you expect a job to run for 2-3 hours, maybe a check every 5 minutes is sufficient.\r\n\r\n### Latest version of dbatools as of writing\r\n\r\n* 0.9.450\r\n"},"comment":{"url":"https://api.github.com/repos/sqlcollaborative/dbatools/issues/comments/426104126","html_url":"https://github.com/sqlcollaborative/dbatools/issues/4103#issuecomment-426104126","issue_url":"https://api.github.com/repos/sqlcollaborative/dbatools/issues/4103","id":426104126,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNjEwNDEyNg==","user":{"login":"sqllensman","id":8676242,"node_id":"MDQ6VXNlcjg2NzYyNDI=","avatar_url":"https://avatars0.githubusercontent.com/u/8676242?v=4","gravatar_id":"","url":"https://api.github.com/users/sqllensman","html_url":"https://github.com/sqllensman","followers_url":"https://api.github.com/users/sqllensman/followers","following_url":"https://api.github.com/users/sqllensman/following{/other_user}","gists_url":"https://api.github.com/users/sqllensman/gists{/gist_id}","starred_url":"https://api.github.com/users/sqllensman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sqllensman/subscriptions","organizations_url":"https://api.github.com/users/sqllensman/orgs","repos_url":"https://api.github.com/users/sqllensman/repos","events_url":"https://api.github.com/users/sqllensman/events{/privacy}","received_events_url":"https://api.github.com/users/sqllensman/received_events","type":"User","site_admin":false},"created_at":"2018-10-02T00:10:21Z","updated_at":"2018-10-02T00:10:21Z","author_association":"CONTRIBUTOR","body":"There is not native support for this in SQL Agent but requires polling to test job status. In my environment we implement a stored procedure to do this. One thing I noted is that need at least 15 seconds wait time to avoid weird false positives. \r\n"}}
{"actor":{"display_login":"sqllensman"}}