title: Java EE 6 @Startup and @Schedule never being executed
body: <p>I have the following singleton which should be executed when the web application starts but it does not, and the scheduled task does not run either.</p>
  <pre><code>@Singleton
  @Startup
  public class Scheduler {
  
      private static int count = 0;
  
      @PostConstruct
      public void onStartup() {
          System.out.println(&quot;Initialization success.&quot;);
      }
  
     @Schedule(second=&quot;*/10&quot;, minute=&quot;*&quot;, hour=&quot;*&quot;)
     public void execute() {
        System.out.println(&quot;its running count...&quot;+count);
        count++;
     }
  }
  </code></pre>
  <p>I am using Glassfish server 3.1.2.</p>
  <p><strong>EDIT</strong></p>
  <p>The startup method is now being executed but the schedule method does not run.</p>