<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="performance-schema-component-scheduler-tasks-table">
      </a>
      29.12.22.1 The component_scheduler_tasks Table
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045067780000">
  </a>
  <a class="indexterm" name="idm46045067778496">
  </a>
  <p>
   The
   <code class="literal">
    component_scheduler_tasks
   </code>
   table
          contains a row for each scheduled task. Each row contains
          information about the ongoing progress of a task that
          applications, components, and plugins can implement,
          optionally, using the
   <code class="literal">
    scheduler
   </code>
   component
          (see
   <a class="xref" href="scheduler-component.html" title="7.5.5 Scheduler Component">
    Section 7.5.5, “Scheduler Component”
   </a>
   ). For example, the
   <code class="literal">
    audit_log
   </code>
   server plugin utilizes the
   <code class="literal">
    scheduler
   </code>
   component to run a regular,
          recurring flush of its memory cache:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa86686497"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql&gt;</span> <span class="token keyword">select</span> <span class="token operator">*</span> <span class="token keyword">from</span> performance_schema<span class="token punctuation">.</span>component_scheduler_tasks\G
<span class="token output"><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 1. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
            NAME<span class="token punctuation">:</span> plugin_audit_log_flush_scheduler
          STATUS<span class="token punctuation">:</span> WAITING
         COMMENT<span class="token punctuation">:</span> Registered by the audit log plugin. Does a periodic refresh of the audit log 
                  in-memory rules cache by calling audit_log_flush
INTERVAL_SECONDS<span class="token punctuation">:</span> 100
       TIMES_RUN<span class="token punctuation">:</span> 5
    TIMES_FAILED<span class="token punctuation">:</span> 0
</span><span class="token output">1 row in set (0.02 sec)</span></code></pre>
  </div>
  <p>
   The
   <code class="literal">
    component_scheduler_tasks
   </code>
   table has the
          following columns:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <code class="literal">
       NAME
      </code>
     </p>
     <p>
      The name supplied during the registration.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       STATUS
      </code>
     </p>
     <p>
      The values are:
     </p>
     <div class="itemizedlist">
      <ul class="itemizedlist" style="list-style-type: circle; ">
       <li class="listitem">
        <p>
         <code class="literal">
          RUNNING
         </code>
         if the task is active and
                  being executed.
        </p>
       </li>
       <li class="listitem">
        <p>
         <code class="literal">
          WAITING
         </code>
         if the task is idle and
                  waiting for the background thread to pick it up or
                  waiting for the next time it needs to be run to
                  arrive.
        </p>
       </li>
      </ul>
     </div>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       COMMENT
      </code>
     </p>
     <p>
      A compile-time comment provided by an application,
              component, or plugin. In the previous example, MySQL Enterprise Audit
              provides the comment using a server plugin named
      <code class="literal">
       audit_log
      </code>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       INTERVAL_SECONDS
      </code>
     </p>
     <p>
      The time in seconds to run a task, which an application,
              component, or plugin provides. MySQL Enterprise Audit enables you to
              specify this value using the
      <a class="link" href="audit-log-reference.html#sysvar_audit_log_flush_interval_seconds">
       <code class="literal">
        audit_log_flush_interval_seconds
       </code>
      </a>
      system variable.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       TIMES_RUN
      </code>
     </p>
     <p>
      A counter that increments by one every time the task runs
              successfully. It wraps around.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       TIMES_FAILED
      </code>
     </p>
     <p>
      A counter that increments by one every time the execution
              of the task fails. It wraps around.
     </p>
    </li>
   </ul>
  </div>
 </div>
 <br/>
</div>
