en/java/javase/17/docs/api/java.base/java/lang/Runnable.html" title="class or interface in java.lang" class="external-link">Runnable</a>&nbsp;command,
 <a href="Trigger.html" title="interface in jakarta.enterprise.concurrent">Trigger</a>&nbsp;trigger)</span></div>
<div class="block">Creates and executes a task based on a Trigger. The Trigger determines when the task
 should run and how often.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>command</code> - the task to execute.</dd>
<dd><code>trigger