{"action":"created","issue":{"url":"https://api.github.com/repos/chef-cookbooks/iis/issues/251","repository_url":"https://api.github.com/repos/chef-cookbooks/iis","labels_url":"https://api.github.com/repos/chef-cookbooks/iis/issues/251/labels{/name}","comments_url":"https://api.github.com/repos/chef-cookbooks/iis/issues/251/comments","events_url":"https://api.github.com/repos/chef-cookbooks/iis/issues/251/events","html_url":"https://github.com/chef-cookbooks/iis/issues/251","id":136438039,"number":251,"title":"Handling failures with iis_config","user":{"login":"Jakauppila","id":4100127,"avatar_url":"https://avatars.githubusercontent.com/u/4100127?v=3","gravatar_id":"","url":"https://api.github.com/users/Jakauppila","html_url":"https://github.com/Jakauppila","followers_url":"https://api.github.com/users/Jakauppila/followers","following_url":"https://api.github.com/users/Jakauppila/following{/other_user}","gists_url":"https://api.github.com/users/Jakauppila/gists{/gist_id}","starred_url":"https://api.github.com/users/Jakauppila/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jakauppila/subscriptions","organizations_url":"https://api.github.com/users/Jakauppila/orgs","repos_url":"https://api.github.com/users/Jakauppila/repos","events_url":"https://api.github.com/users/Jakauppila/events{/privacy}","received_events_url":"https://api.github.com/users/Jakauppila/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/chef-cookbooks/iis/labels/wontfix","name":"wontfix","color":"ffffff"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-02-25T16:30:08Z","updated_at":"2016-03-03T18:37:18Z","closed_at":"2016-03-03T18:37:18Z","body":"I'm using the _iis_config_ resource to define a periodic recycle time with the following:\r\n\r\n```\r\niis_config \"/section:system.applicationHost/applicationPools /+\\\"applicationPoolDefaults.recycling.periodicRestart.schedule.[value='02:00:00']\\\"\" do\r\n    action :set\r\nend\r\n```\r\n\r\nThis works the first time, but if I run the recipe again once it's already configured, I get the following error:\r\n\r\n```\r\nMixlib::ShellOut::ShellCommandFailed\r\n------------------------------------\r\nExpected process to exit with [0], but received '183'\r\n---- Begin output of C:\\Windows\\System32\\inetsrv\\appcmd.exe set config /section:system.applicationHost/applicationPools +\"applicationPoolDefaults.recycling.periodicRestart.schedule.[value='02:00:00']\" ----\r\nSTDOUT: ERROR ( message:New add object missing required attributes. Cannot add duplicate collection entry of type 'add' with unique key attribute 'value' set to '02:00:00'    . )\r\nSTDERR:\r\n---- End output of C:\\Windows\\System32\\inetsrv\\appcmd.exe set config /section:system.applicationHost/applicationPools /+\"applicationPoolDefaults.recycling.periodicRestart.schedule.[value='02:00:00']\"---\r\nRan C:\\Windows\\System32\\inetsrv\\appcmd.exe set config /section:system.applicationHost/applicationPools /+\"applicationPoolDefaults.recycling.periodicRestart.schedule.[value='02:00:00']\" returned 183\r\n```\r\n\r\nWhat's the best way to handle this error?\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/chef-cookbooks/iis/issues/comments/191904666","html_url":"https://github.com/chef-cookbooks/iis/issues/251#issuecomment-191904666","issue_url":"https://api.github.com/repos/chef-cookbooks/iis/issues/251","id":191904666,"user":{"login":"EasyAsABC123","id":1851104,"avatar_url":"https://avatars.githubusercontent.com/u/1851104?v=3","gravatar_id":"","url":"https://api.github.com/users/EasyAsABC123","html_url":"https://github.com/EasyAsABC123","followers_url":"https://api.github.com/users/EasyAsABC123/followers","following_url":"https://api.github.com/users/EasyAsABC123/following{/other_user}","gists_url":"https://api.github.com/users/EasyAsABC123/gists{/gist_id}","starred_url":"https://api.github.com/users/EasyAsABC123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EasyAsABC123/subscriptions","organizations_url":"https://api.github.com/users/EasyAsABC123/orgs","repos_url":"https://api.github.com/users/EasyAsABC123/repos","events_url":"https://api.github.com/users/EasyAsABC123/events{/privacy}","received_events_url":"https://api.github.com/users/EasyAsABC123/received_events","type":"User","site_admin":false},"created_at":"2016-03-03T18:37:18Z","updated_at":"2016-03-03T18:37:18Z","body":"Closing as not fixing in this version"}}