<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  <!ENTITY % general-entities SYSTEM "../../general.ent">
  %general-entities;

  <!ENTITY at-download-http "http://ftp.de.debian.org/debian/pool/main/a/at/at_&at-version;.orig.tar.gz">
  <!ENTITY at-download-ftp  "ftp://ftp.de.debian.org/debian/pool/main/a/at/at_&at-version;.orig.tar.gz">
  <!ENTITY at-md5sum        "d05da75d9b75d93917ffb16ab48b1e19">
  <!ENTITY at-size          "124 KB">
  <!ENTITY at-buildsize     "1.8 MB">
  <!ENTITY at-time          "less than 0.1 SBU">
]>

<sect1 id="at" xreflabel="Fcron-&at-version;">
  <?dbhtml filename="at.html"?>

  <sect1info>
    <othername>$LastChangedBy: bdubbs $</othername>
    <date>$Date: 2015-03-01 20:45:33 -0500 (Sun, 01 Mar 2015) $</date>
  </sect1info>

  <title>at-&at-version;</title>

  <indexterm zone="at">
    <primary sortas="a-at">at</primary>
  </indexterm>

  <sect2 role="package">
    <title>Introduction to at</title>

    <para>The <application>at</application> package provide delayed job execution
    and batch processing. It is required for Linux Standards Base (LSB)
    conformance.</para>

    &lfs77_checked;

    <bridgehead renderas="sect3">Package Information</bridgehead>
    <itemizedlist spacing="compact">
      <listitem>
        <para>Download (HTTP): <ulink url="&at-download-http;"/></para>
      </listitem>
      <listitem>
        <para>Download (FTP): <ulink url="&at-download-ftp;"/></para>
      </listitem>
      <listitem>
        <para>Download MD5 sum: &at-md5sum;</para>
      </listitem>
      <listitem>
        <para>Download size: &at-size;</para>
      </listitem>
      <listitem>
        <para>Estimated disk space required: &at-buildsize;</para>
      </listitem>
      <listitem>
        <para>Estimated build time: &at-time;</para>
      </listitem>
    </itemizedlist>

    <bridgehead renderas="sect3">at Dependencies</bridgehead>

    <bridgehead renderas="sect4">Required</bridgehead>
    <para role="required">
      An <xref linkend="server-mail"/>
    </para>

    <bridgehead renderas="sect4">Optional</bridgehead>
    <para role="optional">
      <xref linkend="linux-pam"/>
    </para>

    <para condition="html" role="usernotes">User Notes:
    <ulink url="&blfs-wiki;/at"/></para>

  </sect2>

  <sect2 role="installation">
    <title>Installation of at</title>

    <note>
      <para>
        This package does not support parallel build.
      </para>
    </note>

    <para>Before building <application>at</application>, as the
    <systemitem class="username">root</systemitem> user you should create
    the group and user <systemitem class="username">atd</systemitem> which
    will run the <command>atd</command> daemon.  Also ensure the working
    directory for the daemon exists:</para>

<screen role="root"><userinput>groupadd -g 17 atd                                                  &amp;&amp;
useradd -d /dev/null -c "atd daemon" -g atd -s /bin/false -u 17 atd &amp;&amp;
mkdir -p /var/spool/cron</userinput></screen>

    <para>
      Fix <filename>Makefile.in</filename> so that the documentation directory
      is installed in the specified docdir:
    </para>

<screen><userinput>sed -i '/docdir/s/=.*/= @docdir@/' Makefile.in</userinput></screen>

    <para>Install <application>at</application> with the following
    commands:</para>

    <screen><userinput>./configure --with-daemon_username=atd        \
            --with-daemon_groupname=atd       \
            SENDMAIL=/usr/sbin/sendmail       &amp;&amp;
make -j1</userinput></screen>

    <para>This package does not come with a test suite.</para>

    <para>Now, as the <systemitem class="username">root</systemitem> user:</para>

<screen role="root"><userinput>make install \
        docdir=/usr/share/doc/at-&at-version; \
      atdocdir=/usr/share/doc/at-&at-version; </userinput></screen>

  </sect2>

  <sect2 role="configuration">
    <title>Configuring at</title>

    <sect3 id="at-config">
      <title>Config Files</title>

      <para> <filename>/etc/at.allow</filename> and
      <filename>/etc/at.deny</filename> determines who can submit jobs via at
      or batch.</para>

      <indexterm zone="at at-config">
        <primary sortas="e-etc-at.allow">/etc/at.allow</primary>
      </indexterm>

      <indexterm zone="at at-config">
        <primary sortas="e-etc-at.deny">/etc/at.deny</primary>
      </indexterm>

    </sect3>

    <sect3  id="at-init">
      <title>Boot Script</title>

      <para>Install the <filename>/etc/init.d/atd</filename> init script from
      the <xref linkend="bootscripts"/> package.</para>

      <indexterm zone="at at-init">
        <primary sortas="f-at">at</primary>
      </indexterm>

<screen role="root"><userinput>make install-atd</userinput></screen>

    </sect3>

  </sect2>

  <sect2 role="content">
    <title>Contents</title>

    <segmentedlist>
      <segtitle>Installed Programs</segtitle>
      <segtitle>Installed Libraries</segtitle>
      <segtitle>Installed Directories</segtitle>

      <seglistitem>
        <seg>at, atd, atq (symlink), atrm (symlink), atrun, and batch</seg>
        <seg>None</seg>
        <seg>
          /var/spool/{atjobs,atspool} and
          /usr/share/doc/at-&at-version;
        </seg>
      </seglistitem>
    </segmentedlist>

    <variablelist>
      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
      <?dbfo list-presentation="list"?>
      <?dbhtml list-presentation="table"?>

      <varlistentry id="at-prog">
        <term><command>at</command></term>
        <listitem>
          <para>queues, examines or deletes jobs for later execution.</para>
          <indexterm zone="at at-prog">
            <primary sortas="b-at">at</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="atd">
        <term><command>atd</command></term>
        <listitem>
          <para>is the daemon that runs jobs queued for later execution.</para>
          <indexterm zone="at atd">
            <primary sortas="b-atd">atd</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="atq">
        <term><command>atq</command></term>
        <listitem>
          <para>lists the user's pending jobs, or all jobs, if superuser.</para>
          <indexterm zone="at atq">
            <primary sortas="b-atq">atq</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="atrm">
        <term><command>atrm</command></term>
        <listitem>
          <para>deletes jobs, identified by their job number.</para>
          <indexterm zone="at atrm">
            <primary sortas="b-atrm">atrm</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="atrun">
        <term><command>atrun</command></term>
        <listitem>
          <para>runs jobs queued for later execution.</para>
          <indexterm zone="at atrun">
            <primary sortas="b-atrun">atrun</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="batch">
        <term><command>batch</command></term>
        <listitem>
          <para>is a script that executes commands when system load levels permit.
          </para>
          <indexterm zone="at batch">
            <primary sortas="b-batch">batch</primary>
          </indexterm>
        </listitem>
      </varlistentry>

    </variablelist>

  </sect2>

</sect1>
