title: Making @Schedule run only once in a clustered environment
body: <p>I have two tomee instances clustered.</p>
  
  <p>Each one have a method annotated like</p>
  
  <pre><code>@Schedule(dayOfWeek = "*")
  public void runMeDaily() {...}
  </code></pre>
  
  <p>I'd like to run this method only once a day. Not twice a day (one on each instance)</p>
  
  <p>I could use a flag as described here <a href="https://stackoverflow.com/questions/8879131/run-scheduled-task-only-on-one-weblogic-cluster-node">Run @Scheduled task only on one WebLogic cluster node?</a> or just elect some node, but I wonder if there's a more elegant way to do that.</p>
  
  <p>This question is somewhat related to <a href="https://stackoverflow.com/questions/21660895/ejb3-1-schedule-in-clustered-environment">EJB3.1 @Schedule in clustered environment</a> but I am not using JBOSS. (and it's not answered)</p>