<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<section xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="_md_docs_2core_2scheduler" xml:lang="en-US">
<title>scheduler</title>
<indexterm><primary>scheduler</primary></indexterm>
<section xml:id="_md_docs_2core_2scheduler_1autotoc_md150">
<title>autotoc_md150</title>
<para>title: ArmaRAMDb - Scheduler icon: mdi:file-text-outline </para>
</section>
<section xml:id="_md_docs_2core_2scheduler_1autotoc_md151">
<title>excerpt: Scheduled Environment for extension.</title></section>
<section xml:id="_md_docs_2core_2scheduler_1autotoc_md152">
<title>ramdb_db_fnc_scheduler</title><section xml:id="_md_docs_2core_2scheduler_1autotoc_md153">
<title>Description</title>
<para>Manages the callback system for the ArmaRAMDb extension. This function receives task IDs from the extension&apos;s asynchronous callbacks, parses them, and registers them in a hashmap for later processing. It acts as the bridge between the extension&apos;s asynchronous operations and the game&apos;s execution environment.</para>
</section>
<section xml:id="_md_docs_2core_2scheduler_1autotoc_md154">
<title>Syntax</title>
<para><literallayout><computeroutput>[_taskID]&#32;call&#32;ramdb_db_fnc_scheduler
</computeroutput></literallayout></para>
</section>
<section xml:id="_md_docs_2core_2scheduler_1autotoc_md155">
<title>Parameters</title>
<para><informaltable frame="all">
    <tgroup cols="4" align="left" colsep="1" rowsep="1">
      <colspec colname='c1'/>
      <colspec colname='c2'/>
      <colspec colname='c3'/>
      <colspec colname='c4'/>
<thead>
      <row  class='markdownTableHead'>
<entry>
<para>Parameter   </para>
</entry><entry>
<para>Type   </para>
</entry><entry>
<para>Description   </para>
</entry><entry>
<para>Default    </para>
</entry></row>
</thead><tbody>
      <row  class='markdownTableRowOdd'>
<entry>
<para><computeroutput>_taskID</computeroutput>   </para>
</entry><entry>
<para>String   </para>
</entry><entry>
<para>Task identifier returned from extension callback   </para>
</entry><entry>
<para>&quot;&quot;   </para>
</entry></row>
    </tbody>
    </tgroup>
</informaltable>
</para>
</section>
<section xml:id="_md_docs_2core_2scheduler_1autotoc_md156">
<title>Return Value</title>
<para>None. The function registers the task ID in a hashmap for later processing.</para>
</section>
<section xml:id="_md_docs_2core_2scheduler_1autotoc_md157">
<title>Examples</title><section xml:id="_md_docs_2core_2scheduler_1autotoc_md158">
<title>Process a callback from the extension:</title>
<para><literallayout><computeroutput>[&quot;1689524160123_get&quot;]&#32;call&#32;ramdb_db_fnc_scheduler;
</computeroutput></literallayout></para>
</section>
<section xml:id="_md_docs_2core_2scheduler_1autotoc_md159">
<title>Forward a callback to the server:</title>
<para><literallayout><computeroutput>[&quot;1689524160123_hgetall&quot;]&#32;remoteExecCall&#32;[&quot;ramdb_db_fnc_scheduler&quot;,&#32;2,&#32;false];
</computeroutput></literallayout></para>
</section>
</section>
<section xml:id="_md_docs_2core_2scheduler_1autotoc_md160">
<title>Notes</title>
<para><itemizedlist>
<listitem>
<para>Parses the task ID to extract the timestamp and operation type</para>
</listitem><listitem>
<para>Registers the task in a type-specific hashmap using the mission namespace</para>
</listitem><listitem>
<para>Each operation type (get, hgetall, etc.) has its own hashmap for tracking</para>
</listitem><listitem>
<para>The format of task IDs is typically: <computeroutput>[timestamp]_[operation]</computeroutput></para>
</listitem><listitem>
<para>This function is automatically called by the extension callback mechanism</para>
</listitem><listitem>
<para>Creates hashmaps on demand if they don&apos;t already exist</para>
</listitem><listitem>
<para>Critical for handling asynchronous database operations</para>
</listitem></itemizedlist>
</para>
</section>
<section xml:id="_md_docs_2core_2scheduler_1autotoc_md161">
<title>Related Functions</title>
<para><itemizedlist>
<listitem>
<para><computeroutput>ramdb_db_fnc_fetch</computeroutput>: Assembles data chunks for large datasets</para>
</listitem><listitem>
<para><computeroutput>ramdb_db_fnc_handler</computeroutput>: Processes the data retrieved from database operations</para>
</listitem><listitem>
<para><computeroutput>ramdb_db_fnc_processQueue</computeroutput>: Executes queued database operations</para>
</listitem></itemizedlist>
</para>
</section>
<section xml:id="_md_docs_2core_2scheduler_1autotoc_md162">
<title>Links</title>
<para><link linkend="_md_docs_2core_2add_task">Add Task</link> | <link linkend="_md_docs_2core_2handler">Handler</link> | <link linkend="_md_docs_2core_2init">Init</link> | <link linkend="_md_docs_2core_2print_addon_name">Print Addon Name</link> | <link linkend="_md_docs_2core_2process_queue">Process Queue</link> | <link linkend="_md_docs_2core_2scheduler">Scheduler</link> | <link linkend="_md_docs_2core_2test">Test</link> </para>
</section>
</section>
</section>
