<commit_before><?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
<!-- $Id: scheduler.xml,v 1.1 2011-08-04 04:34:02 cr Exp $ -->

<chapter id="scheduler">
    <title>OTRS Scheduler</title>

    <section id="scheduler-gui">
        <title>Scheduler Graphic Interface</title>
        <para>
        .
        </para>
            <section id="scheduler-gui-notify">
                <title>Scheduler Not Running Notification</title>
                <para>
                .
                </para>
                <para>
                    <screenshot>
                        <screeninfo>Scheduler Notification</screeninfo>
                        <graphic srccredit="scheduler notification - screenshot" scale="40" fileref="screenshots/scheduler-notify.png"></graphic>
                    </screenshot>
                </para>
                <para>
                    <emphasis>Figure: Scheduler notification.</emphasis>
                </para>
            </section>
            <section id="scheduler-gui-start">
                <title>Start Scheduler</title>
                <para>
                .
                </para>
                <para>
                    <screenshot>
                        <screeninfo>Start Scheduler</screeninfo>
                        <graphic srccredit="scheduler start - screenshot" scale="40" fileref="screenshots/scheduler-start.png"></graphic>
                    </screenshot>
                </para>
                <para>
                    <emphasis>Figure: Start Scheduler.</emphasis>
                </para>

            </section>

    </section>

    <section id="scheduler-cli">
        <title>Scheduler Command Line Interface</title>
        <section id="scheduler-cli-linux">
            <title>Linux</title>
            <para>
            .
            </para>
            <section id="scheduler-cli-linux-init">
                <title>Scheduler Init Files</title>
                <para>
                .
                </para>
            </section>
            <section id="scheduler-cli-linux-daemon">
                <title>Scheduler Daemon File</title>
                <para>
                .
                </para>
            </section>
        </section>

       <section id="scheduler-cli-windows">
            <title>Windows</title>
            <para>
            .
            </para>
            <section id="scheduler-cli-windows-scm">
                <title>Scheduler Service Installer</title>
                <para>
                .
                </para>
            </section>
            <section id="scheduler-cli-linux-service">
                <title>Scheduler service File</title>
                <para>
                .
                </para>
            </section>
        </section>
    </section>

</chapter>
<commit_msg>Filled empty sections<commit_after><?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
<!-- $Id: scheduler.xml,v 1.2 2011-08-05 03:22:30 cr Exp $ -->

<chapter id="scheduler">
    <title>OTRS Scheduler</title>
    <para>
        The OTRS Scheduler is an independent system process that execute tasks in background. this
        kind of processes are know as Daemons in Unix / Linux systems or as Services on Windows
        environments. To be independent doesn't mean that the Scheduler do all alone, it is fully
        integrated to OTRS and can use any OTRS module as needed to complete each task.
    </para>
    <para>
        Currently OTRS Scheduler is only able to handle Generic Interface tasks, this kind of tasks
        executes invokers that sends requests to Remote Systems. Other handlers for different tasks
        will be added on further OTRS versions.
    </para>
    <para>
        For sanity reasons the Scheduler process needs to be restarted from time to time, this is
        done automatically by the scheduler process itself once a day, but it can be adjusted as
        needed using the SysConfig by editing the "Scheduler::RestartAfterSeconds" setting.
    </para>
    <para>
        OTRS Scheduler is a set it and forget it process, the only needed human interaction is to
        check its status and start or stop it as needed.
    </para>
    <note>
        <para>
            If Scheduler is stopped for any reason all left tasks and new tasks registered when the
            Scheduler is stopped, are going to be executed ASAP when the Scheduler starts again
            (unless the tasks are programmed to be executed in the future).
        </para>
    </note>
    <section id="scheduler-gui">
        <title>Scheduler Graphical Interface</title>
        <para>
            Scheduler is not visible in the OTRS Graphical User Interface unless it stops running
            when it should be running.
        </para>
            <section id="scheduler-gui-notify">
                <title>Scheduler Not Running Notification</title>
                <para>
                    There are two notifications if the system does not detect that scheduler is
                    running this detection in based on the Scheduler process update frequency, if
                    the difference between current time and the last process update time is 2X the
                    process update frequency a warning message will be displayed in the OTRS
                    notification area. If it over pass 4X the process frequency then an alert will
                    be displayed.
                </para>
                <para>
                    The Scheduler process update time can be configured via the SysConfig in the
                    "Scheduler::PIDUpdateTime" setting.
                </para>
                <para>
                    For a warning message it is not always necessary to take an action, but is
                    highly recommended to check if the scheduler process is running. If the alert
                    came then is highly probable that the scheduler is not running and should be
                    started.
                </para>
                <para>
                    By default the Scheduler not running notification is enabled (if there is a
                    valid web service registered in the database) and is only displayed to the
                    users in the "admin" group.
                </para>
                <para>
                    To disable the notification (not recommended) or to change or add the
                    notification groups, please edit the
                    "Frontend::NotifyModule###800-Scheduler-Check" setting in the SysConfig.
                </para>
                <para>
                    <screenshot>
                        <screeninfo>Scheduler Notification</screeninfo>
                        <graphic srccredit="scheduler notification - screenshot" scale="40" fileref="screenshots/scheduler-notify.png"></graphic>
                    </screenshot>
                </para>
                <para>
                    <emphasis>Figure: Scheduler notification.</emphasis>
                </para>
            </section>
            <section id="scheduler-gui-start">
                <title>Start Scheduler</title>
                <para>
                    By clicking on the Scheduler not running notification link (either warning or
                    alert) a dialog box will open to let you start the Scheduler process again. The
                    Scheduler can be stared normally or forced to start, by clicking on the
                    appropriate check box in the dialog.
                </para>
                <note>
                    <para>
                        A forced Scheduler start is only necessary if previous Scheduler process was
                        terminated abnormally and the Process ID is still registered on the
                        database.
                    </para>
                    <para>
                        To have full control of the Scheduler process and to check it real status
                        please use the command line tools descried below.
                    </para>
                </note>
                <para>
                    <screenshot>
                        <screeninfo>Start Scheduler</screeninfo>
                        <graphic srccredit="scheduler start - screenshot" scale="40" fileref="screenshots/scheduler-start.png"></graphic>
                    </screenshot>
                </para>
                <para>
                    <emphasis>Figure: Start Scheduler.</emphasis>
                </para>

            </section>

    </section>

    <section id="scheduler-cli">
        <title>Scheduler Command Line Interface</title>
        <para>
            The Scheduler command line tools let you control the Scheduler process (Start /
            Stop) or query it status. There are also tools to register the process to be
            controlled by the operating system.
        </para>
        <para>
            Included with OTRS there are two set of CLI tools, one for Unix / Linux OS and another
            for MS Windows OS.
        </para>
        <section id="scheduler-cli-linux">
            <title>Unix / Linux</title>
            <section id="scheduler-cli-linux-init">
                <title>Scheduler Init.d Files</title>
                <para>
                    Init.d files are special scripts that are called by the operating system at
                    startup and shutdown (or restart) times.
                </para>
                <para>
                    OTRS provide init.d scripts to start / stop the OTRS Scheduler process
                    automatically by the operating system, this scripts are located under
                    OTRS_HOME/scripts.
                </para>
                <para>
                    Init.d scripts needs to be copied to the correct location for your operating
                    system, they need to had the proper permissions and some internal variables
                    needs to be set to work properly.
                </para>
                <itemizedlist mark="round">
                    <title>Init.d Script Internal Variables</title>
                    <listitem>
                        <para>
                            <command>OTRS_HOME</command> - the path of your OTRS installation.
                        </para>
                    </listitem>
                    <listitem>
                        <para>
                            <command>User</command> - the apache process user name.
                        </para>
                    </listitem>
                    <listitem>
                        <para>
                            <command>Group</command> - the apache process user's group name.
                        </para>
                    </listitem>
                </itemizedlist>
                <note>
                    <para>
                        Currently there are only init.d scripts for Linux platforms.
                    </para>
                </note>
                <table>
                    <title>List of Init Scripts And Supported Operating Systems</title>
                    <tgroup cols="2">
                    <thead>
                        <tr>
                            <th>Init Script</th>
                            <th>Supported OS</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>otrs-scheduler-linux</td>
                            <td>RedHat, Fedora, CentOS, SuSE, OpenSuSE, Debian, Ubuntu</td>
                        </tr>
                        <tr>
                            <td>otrs-scheduler-gentoo-init.d, otrs-scheduler-gentoo-conf.d</td>
                            <td>Gentoo</td>
                        </tr>
                    </tbody>
                    </tgroup>
                </table>
                <example>
                    <title>Example To Start The OTRS Scheduler Form An Init.d Script</title>
                    <para>
                        <screen>
                            shell> /etc/init.d/otrs-scheduler-linux start
                        </screen>
                    </para>
                </example>
                <itemizedlist mark="round">
                    <title>Available Actions</title>
                    <listitem>
                        <para>
                            <command>start</command> to start the OTRS Scheduler process.
                        </para>
                    </listitem>
                    <listitem>
                        <para>
                            <command>stop</command> to stop the OTRS Scheduler process.
                        </para>
                    </listitem>
                    <listitem>
                        <para>
                            <command>restart</command> to restart the OTRS Scheduler process.
                        </para>
                    </listitem>
                    <listitem>
                        <para>
                            <command>status</command> to query the OTRS Scheduler process status.
                        </para>
                    </listitem>
                </itemizedlist>
                <para>
                    Scheduler needs the database to be available to register it Process ID, for this
                    reason is necessary to:
                    <itemizedlist mark="round">
                        <listitem>
                            <para>
                                Execute the Scheduler init.d script to <emphasis>start </emphasis>
                                the Scheduler process after the database process is up and running.
                            </para>
                        </listitem>
                        <listitem>
                            <para>
                                Execute the Scheduler init.d script to <emphasis>stop </emphasis>
                                the Scheduler before the database process shuts down.
                            </para>
                        </listitem>
                    </itemizedlist>
                </para>
                <note>
                    <para>
                        If you want that Scheduler runs at system startup, please read the
                        documentation of the operating system for the right location to place the
                        init.d scripts, how to configure them to run automatically and its run
                        order.
                    </para>
                </note>
            </section>
            <section id="scheduler-cli-linux-daemon">
                <title>Scheduler Daemon File</title>
                <para>
                    This is the part of the Scheduler that stays running in the background checking
                    for tasks to execute. It also provides the main functions to control the
                    process.
                </para>
                <para>
                    All Unix / Linux uses the file
                    <command>OTRS_HOME/bin/otrs.Scheduler.pl</command>.
                </para>
                <example>
                    <title>Example To Start The OTRS Scheduler</title>
                    <para>
                        <screen>
                            shell> OTRS_HOME/bin/otrs.Scheduler.pl -a start
                        </screen>
                    </para>
                </example>
                <itemizedlist mark="round">
                    <title>Available Options</title>
                    <listitem>
                        <para>
                            <command>-a </command> action.
                        </para>
                        <itemizedlist mark="round">
                            <title>Possible Values</title>
                            <listitem>
                                <para>
                                    <command>start</command>- to start the Scheduler process.
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <command>stop</command>- to stop the Scheduler process.
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <command>status</command>- to query Scheduler process status.
                                </para>
                            </listitem>
                        </itemizedlist>
                    </listitem>
                    <listitem>
                        <para>
                            <command>-f </command> to force the start or stop of the Scheduler
                            process.
                        </para>
                    </listitem>
                </itemizedlist>
                <example>
                    <title>Example To Force Stop The OTRS Scheduler</title>
                    <para>
                        <screen>
                            shell> OTRS_HOME/bin/otrs.Scheduler.pl -a stop -f 1
                        </screen>
                    </para>
                </example>
                <note>
                    <para>
                        Force stop the Scheduler is used remove the process ID from the database
                        when scheduler is not running and the process is still registered.
                    </para>
                    <para>
                        Force start the Scheduler is used to start the Scheduler process if the
                        scheduler is not running and the process is registered.
                    </para>
                    <para>
                        Force start or stop are only necessary if the start of the process is needed
                        to be done before the process update time expires. Otherwise an expired
                        entry in the database is discarded by normal start.
                    </para>
                </note>
            </section>
        </section>

       <section id="scheduler-cli-windows">
            <title>Windows</title>
            <section id="scheduler-cli-windows-scm">
                <title>Scheduler Service Installer</title>
                <para>
                    The integration of the services into the MS Windows Operating System is done
                    in the Windows Service Control Manager (SCM). In order to make the OTRS Scheduler
                    process to be controlled by the SCM is necessary to register it.
                </para>
                <para>
                    OTRS provides the script
                    <command>OTRS_HOME/bin/otrs.Scheduler4WinInstaller.pl</command> to register or
                    unregister the OTRS Scheduler into the SCM.
                </para>
                <example>
                    <title>Example To Register The OTRS Scheduler Into the Widows SCM</title>
                    <para>
                        <screen>
                            shell> OTRS_HOME/bin/otrs.Scheduler4WinInstaller.pl -a install
                        </screen>
                    </para>
                </example>
                <itemizedlist mark="round">
                    <title>Available Options</title>
                    <listitem>
                        <para>
                            <command>-a </command> action.
                        </para>
                        <itemizedlist mark="round">
                            <title>Possible Values</title>
                            <listitem>
                                <para>
                                    <command>install</command>- to install the Scheduler process
                                    into the Windows SCM.
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <command>remove</command>- to remove the Scheduler process from
                                    the Windows SCM.
                                </para>
                            </listitem>
                        </itemizedlist>
                    </listitem>
                </itemizedlist>
                <para>
                    After installed into the Widows SCM The OTRS Scheduler process can be used as
                    any other service in Windows, it can be started, stopped and restarted and can
                    be configured to be started manually or automatic.
                </para>
                <note>
                    <para>
                        To learn more about Windows Services and the Windows SCM please read the
                        Windows documentation, and Microsoft online help.
                    </para>
                </note>
            </section>
            <section id="scheduler-cli-linux-service">
                <title>Scheduler Service File</title>
                <para>
                    This is the part of the Scheduler that stays running in the background checking
                    for tasks to execute. It also provides the main functions to control the
                    process.
                </para>
                <para>
                    Windows Operating System uses the file
                    <command>OTRS_HOME/bin/otrs.Scheduler4Win.pl</command>.
                </para>
                <example>
                    <title>Example To Start The OTRS Scheduler</title>
                    <para>
                        <screen>
                            shell> OTRS_HOME/bin/otrs.Scheduler4Win.pl -a start
                        </screen>
                    </para>
                </example>
                <itemizedlist mark="round">
                    <title>Available Options</title>
                    <listitem>
                        <para>
                            <command>-a </command> action.
                        </para>
                        <itemizedlist mark="round">
                            <title>Possible Values</title>
                            <listitem>
                                <para>
                                    <command>start</command>- to start the Scheduler process.
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <command>stop</command>- to stop the Scheduler process.
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <command>status</command>- to query Scheduler process status.
                                </para>
                            </listitem>
                        </itemizedlist>
                    </listitem>
                    <listitem>
                        <para>
                            <command>-f </command> to force the start or stop of the Scheduler
                            process.
                        </para>
                    </listitem>
                </itemizedlist>
                <example>
                    <title>Example To Force Stop The OTRS Scheduler</title>
                    <para>
                        <screen>
                            shell> OTRS_HOME/bin/otrs.Scheduler4Win.pl -a stop -f 1
                        </screen>
                    </para>
                </example>
                <note>
                    <para>
                        Force stop the Scheduler is used remove the process ID from the database
                        when scheduler is not running and the process is still registered.
                    </para>
                    <para>
                        Force start the Scheduler is used to start the Scheduler process if the
                        scheduler is not running and the process is registered.
                    </para>
                    <para>
                        Force start or stop are only necessary if the start of the process is needed
                        to be done before the process update time expires. Otherwise an expired
                        entry in the database is discarded by normal start.
                    </para>
                </note>
            </section>
        </section>

    </section>
</chapter>

{'fraction_non_alphanumeric': 0.07123618090452262, 'fraction_numerical': 0.002693467336683417, 'mean_word_length': 1.0080723280594124, 'pattern_counts': {'":': 0, '<': 497, '<?xml version=': 2, '>': 503, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 13, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4611060', 'n_tokens_mistral': 5714, 'n_tokens_neox': 5175, 'n_words': 1814}