systemd.timer.xml revision f3e219a238c716ffa06fab7b0618197c090dfd5a
97a9a944b5887e91042b019776c41d5dd74557aferikabele<?xml version='1.0'?> <!--*-nxml-*-->
97a9a944b5887e91042b019776c41d5dd74557aferikabele<?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
97a9a944b5887e91042b019776c41d5dd74557aferikabele<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
a945f35eff8b6a88009ce73de6d4c862ce58de3cslive "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
a945f35eff8b6a88009ce73de6d4c862ce58de3cslive
a945f35eff8b6a88009ce73de6d4c862ce58de3cslive<!--
5a58787efeb02a1c3f06569d019ad81fd2efa06end This file is part of systemd.
5a58787efeb02a1c3f06569d019ad81fd2efa06end
5a58787efeb02a1c3f06569d019ad81fd2efa06end Copyright 2010 Lennart Poettering
5a58787efeb02a1c3f06569d019ad81fd2efa06end
5a58787efeb02a1c3f06569d019ad81fd2efa06end systemd is free software; you can redistribute it and/or modify it
5a58787efeb02a1c3f06569d019ad81fd2efa06end under the terms of the GNU General Public License as published by
5a58787efeb02a1c3f06569d019ad81fd2efa06end the Free Software Foundation; either version 2 of the License, or
5a58787efeb02a1c3f06569d019ad81fd2efa06end (at your option) any later version.
5a58787efeb02a1c3f06569d019ad81fd2efa06end
52fff662005b1866a3ff09bb6c902800c5cc6dedjerenkrantz systemd is distributed in the hope that it will be useful, but
5a58787efeb02a1c3f06569d019ad81fd2efa06end WITHOUT ANY WARRANTY; without even the implied warranty of
5a58787efeb02a1c3f06569d019ad81fd2efa06end MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5a58787efeb02a1c3f06569d019ad81fd2efa06end General Public License for more details.
4b5981e276e93df97c34e4da05ca5cf8bbd937dand
5a58787efeb02a1c3f06569d019ad81fd2efa06end You should have received a copy of the GNU General Public License
a63f0ab647ad2ab72efc9bea7a66e24e9ebc5cc2nd along with systemd; If not, see <http://www.gnu.org/licenses/>.
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd-->
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd<refentry id="systemd.timer">
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd <refentryinfo>
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd <title>systemd.timer</title>
5a58787efeb02a1c3f06569d019ad81fd2efa06end <productname>systemd</productname>
5a58787efeb02a1c3f06569d019ad81fd2efa06end
5a58787efeb02a1c3f06569d019ad81fd2efa06end <authorgroup>
5a58787efeb02a1c3f06569d019ad81fd2efa06end <author>
5a58787efeb02a1c3f06569d019ad81fd2efa06end <contrib>Developer</contrib>
5a58787efeb02a1c3f06569d019ad81fd2efa06end <firstname>Lennart</firstname>
5a58787efeb02a1c3f06569d019ad81fd2efa06end <surname>Poettering</surname>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <email>lennart@poettering.net</email>
ced7ef1f8c0df1805da0e87dbc5a1b6282910573nd </author>
9b6a3a558cc90ffdaa0b50bd02546ffec424ded7slive </authorgroup>
ced7ef1f8c0df1805da0e87dbc5a1b6282910573nd </refentryinfo>
b21197dc8e6b8c764fdcc24d4bae8b0eebb6bc4end
9b6a3a558cc90ffdaa0b50bd02546ffec424ded7slive <refmeta>
9b6a3a558cc90ffdaa0b50bd02546ffec424ded7slive <refentrytitle>systemd.timer</refentrytitle>
9b6a3a558cc90ffdaa0b50bd02546ffec424ded7slive <manvolnum>5</manvolnum>
97a9a944b5887e91042b019776c41d5dd74557aferikabele </refmeta>
f8396ed8364b56ec8adeaa49cac35a929758a29eslive
97a9a944b5887e91042b019776c41d5dd74557aferikabele <refnamediv>
f8396ed8364b56ec8adeaa49cac35a929758a29eslive <refname>systemd.timer</refname>
f8396ed8364b56ec8adeaa49cac35a929758a29eslive <refpurpose>systemd timer configuration files</refpurpose>
5a58787efeb02a1c3f06569d019ad81fd2efa06end </refnamediv>
5a58787efeb02a1c3f06569d019ad81fd2efa06end
5a58787efeb02a1c3f06569d019ad81fd2efa06end <refsynopsisdiv>
a63f0ab647ad2ab72efc9bea7a66e24e9ebc5cc2nd <para><filename>systemd.timer</filename></para>
5a58787efeb02a1c3f06569d019ad81fd2efa06end </refsynopsisdiv>
deeee6bb6fd94c0ba5f3730b58abd9d299c89ccdnd
117c1f888a14e73cdd821dc6c23eb0411144a41cnd <refsect1>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd <title>Description</title>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd
117c1f888a14e73cdd821dc6c23eb0411144a41cnd <para>A unit configuration file whose name ends in
117c1f888a14e73cdd821dc6c23eb0411144a41cnd <filename>.timer</filename> encodes information about
117c1f888a14e73cdd821dc6c23eb0411144a41cnd a timer controlled and supervised by systemd, for
117c1f888a14e73cdd821dc6c23eb0411144a41cnd timer-based activation.</para>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd
117c1f888a14e73cdd821dc6c23eb0411144a41cnd <para>This man page lists the configuration options
117c1f888a14e73cdd821dc6c23eb0411144a41cnd specific to this unit type. See
2bc7f1cf720973a67f8ff7a8d523e40569ae5b6cnd <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd for the common options of all unit configuration
117c1f888a14e73cdd821dc6c23eb0411144a41cnd files. The common configuration items are configured
117c1f888a14e73cdd821dc6c23eb0411144a41cnd in the generic [Unit] and [Install] sections. The
117c1f888a14e73cdd821dc6c23eb0411144a41cnd timer specific configuration options are configured in
117c1f888a14e73cdd821dc6c23eb0411144a41cnd the [Timer] section.</para>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd
87ffb6e33f3cbef3b9bb406cc2d27039fa336eaatrawick <para>For each timer file, a matching unit file must
117c1f888a14e73cdd821dc6c23eb0411144a41cnd exist, describing the unit to activate when the timer
5a58787efeb02a1c3f06569d019ad81fd2efa06end elapses. By default, a service by the same name as the
5a58787efeb02a1c3f06569d019ad81fd2efa06end timer (except for the suffix) is activated. Example: a
5a58787efeb02a1c3f06569d019ad81fd2efa06end timer file <filename>foo.timer</filename> activates a
5a58787efeb02a1c3f06569d019ad81fd2efa06end matching service <filename>foo.service</filename>. The
5a58787efeb02a1c3f06569d019ad81fd2efa06end unit to activate may be controlled by
5a58787efeb02a1c3f06569d019ad81fd2efa06end <varname>Unit=</varname> (see below).</para>
a63f0ab647ad2ab72efc9bea7a66e24e9ebc5cc2nd
a63f0ab647ad2ab72efc9bea7a66e24e9ebc5cc2nd <para>Unless <varname>DefaultDependencies=</varname>
5a58787efeb02a1c3f06569d019ad81fd2efa06end is set to <option>false</option>, timer units will
5a58787efeb02a1c3f06569d019ad81fd2efa06end implicitly have dependencies of type
5a58787efeb02a1c3f06569d019ad81fd2efa06end <varname>Conflicts=</varname> and
5a58787efeb02a1c3f06569d019ad81fd2efa06end <varname>Before=</varname> on
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <filename>shutdown.target</filename>. These ensure
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick that timer units are stopped cleanly prior to system
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick shutdown. Only timer units involved with early boot or
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick late system shutdown should disable this
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick option.</para>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive </refsect1>
ea8a727ff298d2f5368b55b7ae8d87091ae106e7nd
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <refsect1>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <title>Options</title>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive
92510838f2eb125726e15c5eb4f7a23c7a0396e4slive <para>Timer files must include a [Timer] section,
97a9a944b5887e91042b019776c41d5dd74557aferikabele which carries information about the timer it
ced7ef1f8c0df1805da0e87dbc5a1b6282910573nd defines. The options specific to the [Timer] section
92510838f2eb125726e15c5eb4f7a23c7a0396e4slive of timer units are the following:</para>
97a9a944b5887e91042b019776c41d5dd74557aferikabele
9b6a3a558cc90ffdaa0b50bd02546ffec424ded7slive <variablelist>
9b6a3a558cc90ffdaa0b50bd02546ffec424ded7slive <varlistentry>
92510838f2eb125726e15c5eb4f7a23c7a0396e4slive <term><varname>OnActiveSec=</varname></term>
92510838f2eb125726e15c5eb4f7a23c7a0396e4slive <term><varname>OnBootSec=</varname></term>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <term><varname>OnStartupSec=</varname></term>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <term><varname>OnUnitActiveSec=</varname></term>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <term><varname>OnUnitInactiveSec=</varname></term>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <listitem><para>Defines timers
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick relative to different starting points:
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <varname>OnActiveSec=</varname> defines a
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick timer relative to the moment the timer
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick itself is
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick activated. <varname>OnBootSec=</varname>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick defines a timer relative to when the
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick machine was booted
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick up. <varname>OnStartupSec=</varname>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick defines a timer relative to when
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick systemd was
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick started. <varname>OnUnitActiveSec=</varname>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick defines a timer relative to when the
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick unit the timer is activating was last
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick activated. <varname>OnUnitInactiveSec=</varname>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick defines a timer relative to when the
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick unit the timer is activating was last
ced7ef1f8c0df1805da0e87dbc5a1b6282910573nd deactivated.</para>
ced7ef1f8c0df1805da0e87dbc5a1b6282910573nd
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <para>Multiple directives may be
e7131afdda636994bf3c7a6b2e77e5960fb62633nd combined of the same and of different
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick types. For example, by combining
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <varname>OnBootSec=</varname> and
ced7ef1f8c0df1805da0e87dbc5a1b6282910573nd <varname>OnUnitActiveSec=</varname> it is
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick possible to define a timer that
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick elapses in regular intervals and
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick activates a specific service each
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick time.</para>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <para>The arguments to the directives
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick are time spans configured in
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick seconds. Example: "OnBootSec=50" means
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick 50s after boot-up. The argument may
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick also include time units. Example:
92510838f2eb125726e15c5eb4f7a23c7a0396e4slive "OnBootSec=5h 30min" means 5 hours and 30
92510838f2eb125726e15c5eb4f7a23c7a0396e4slive minutes after boot-up. For details
97a9a944b5887e91042b019776c41d5dd74557aferikabele about the syntax of time spans see
92510838f2eb125726e15c5eb4f7a23c7a0396e4slive <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
ea8a727ff298d2f5368b55b7ae8d87091ae106e7nd
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <para>If a timer configured with
ea8a727ff298d2f5368b55b7ae8d87091ae106e7nd <varname>OnBootSec=</varname> or
ea8a727ff298d2f5368b55b7ae8d87091ae106e7nd <varname>OnStartupSec=</varname> is
ea8a727ff298d2f5368b55b7ae8d87091ae106e7nd already in the past when the timer
ea8a727ff298d2f5368b55b7ae8d87091ae106e7nd unit is activated, it will immediately
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick elapse and the configured unit is
ea8a727ff298d2f5368b55b7ae8d87091ae106e7nd started. This is not the case for
06ba4a61654b3763ad65f52283832ebf058fdf1cslive timers defined in the other
e8d485701957d5c6de870111c112e168a894d49and directives.</para></listitem>
e8d485701957d5c6de870111c112e168a894d49and
e8d485701957d5c6de870111c112e168a894d49and <para>These are monotonic timers,
9b6a3a558cc90ffdaa0b50bd02546ffec424ded7slive independent of wall-clock time and timezones. If the
9b6a3a558cc90ffdaa0b50bd02546ffec424ded7slive computer is temporarily suspended, the
9b6a3a558cc90ffdaa0b50bd02546ffec424ded7slive monotonic clock stops too.</para>
9bcfc3697a91b5215893a7d0206865b13fc72148nd
9b6a3a558cc90ffdaa0b50bd02546ffec424ded7slive </varlistentry>
9b6a3a558cc90ffdaa0b50bd02546ffec424ded7slive <varlistentry>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <term><varname>Unit=</varname></term>
97a9a944b5887e91042b019776c41d5dd74557aferikabele
9b6a3a558cc90ffdaa0b50bd02546ffec424ded7slive <listitem><para>The unit to activate
9b6a3a558cc90ffdaa0b50bd02546ffec424ded7slive when this timer elapses. The argument is a
5a58787efeb02a1c3f06569d019ad81fd2efa06end unit name, whose suffix is not
5a58787efeb02a1c3f06569d019ad81fd2efa06end <filename>.timer</filename>. If not
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd specified, this value defaults to a
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd service that has the same name as the
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd timer unit, except for the
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd suffix. (See above.) It is recommended,
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd that the unit name that is activated
b95ae799514ad86a15610ad75808d7065e9847c9kess and the unit name of the timer unit
5a58787efeb02a1c3f06569d019ad81fd2efa06end are named identical, except for the
5a58787efeb02a1c3f06569d019ad81fd2efa06end suffix.</para></listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>See Also</title>
<para>
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
</para>
</refsect1>
</refentry>