title: What does :delayed do for notifies? Or why is it not working properly?
body: <p>I was always was under impression that <code>delayed</code> as follows</p>
  
  <pre><code>notifies :restart, 'service[nexus]', :delayed
  </code></pre>
  
  <p>would delay the restart of the service to the end of the run. Now I noticed that doesn't seem to be the case. As the log below shows, the restart is send delayed and executed immediately. Each time.</p>
  
  <p>The log is very strange btw because it seems that the recipe is run multiple times. I only have one <code>ruby_block</code> for <code>security-configuration.xml</code> but it appears many many times in the log.</p>
  
  <p>What is the purpose of <code>:delayed</code>? What is delayed?</p>
  
  <p>How is it possible that a resource is shown in the log multiple times? Should it not run once?</p>
  
  <pre><code>==&gt; default: [2016-08-18T13:24:31+00:00] INFO: ruby_block[/opt/nexus/sonatype-work/conf/security-configuration.xml] sending restart action to service[nexus] (delayed)
  ==&gt; default: [2016-08-18T13:24:55+00:00] INFO: service[nexus] restarted
  ==&gt; default: [2016-08-18T13:24:55+00:00] INFO: ruby_block[/opt/nexus/sonatype-work/conf/security-configuration.xml] sending restart action to service[nexus] (delayed)
  ==&gt; default: [2016-08-18T13:25:13+00:00] INFO: service[nexus] restarted
  ==&gt; default: [2016-08-18T13:25:13+00:00] INFO: ruby_block[/opt/nexus/sonatype-work/conf/security-configuration.xml] sending restart action to service[nexus] (delayed)
  ==&gt; default: [2016-08-18T13:25:36+00:00] INFO: service[nexus] restarted
  ==&gt; default: [2016-08-18T13:25:36+00:00] INFO: ruby_block[/opt/nexus/sonatype-work/conf/security-configuration.xml] sending restart action to service[nexus] (delayed)
  ==&gt; default: [2016-08-18T13:25:59+00:00] INFO: service[nexus] restarted
  ==&gt; default: [2016-08-18T13:25:59+00:00] INFO: ruby_block[/opt/nexus/sonatype-work/conf/security-configuration.xml] sending restart action to service[nexus] (delayed)
  </code></pre>
  
  <p>I am using Chef client 12.4.1.</p>
  
  <p><em>Update</em></p>
  
  <p>So my understanding of delayed was correct. The question now is why delayed is no longer working. This btw this behavior is also present for other services for example jenkins</p>
  
  <pre><code>==&gt; default: [2016-08-19T06:51:56+00:00] INFO: template[/var/lib/jenkins/config.xml] sending restart action to service[jenkins] (delayed)
  ==&gt; default: [2016-08-19T06:51:58+00:00] INFO: service[jenkins] restarted 
  </code></pre>
  
  <p>Services that are notified for restart delayed are restarting immediately and as a consequence multiple times during a run. This is now also causing the run to fail with messages that restart is done to often.</p>
  
  <pre><code>==&gt; default: STDERR: Job for jenkins.service failed because start of the service was attempted too often. See "systemctl status jenkins.service" and "journalctl -xe" for details.
  </code></pre>
  
  <p>This ability to restart services delayed is rather crucial. Why is it not working properly?</p>