ld --as-needed compilation fixes with external libs.
[fvwm.git] / doc / commands / Schedule.xml
blob2900cf1dc86e2af26f93075894fa7a5bd34f03da
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!-- $Id: Schedule.xml,v 1.3 2007/06/16 12:38:46 griph Exp $ -->
3 <!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
4   "../docbook-xml/docbookx.dtd"
6 <!ENTITY % myents SYSTEM "../fvwm.ent" >
7 %myents;
8 ]>
11 <section id='Schedule'>
12 <title>Schedule</title>
14 <cmdsynopsis>
15         <command>Schedule</command
16         ><arg choice='opt'>Periodic</arg
17         ><arg choice='plain'
18                 ><replaceable>delay_ms</replaceable
19         ></arg
20         ><arg choice='opt'
21                 ><replaceable>command_id</replaceable
22         ></arg
23         ><arg choice='plain'
24                 ><replaceable>command</replaceable
25         ></arg>
26 </cmdsynopsis>
28 <para>The
29 <replaceable>command</replaceable>
30 is executed after about
31 <replaceable>delay_ms</replaceable>
32 milliseconds.  This may be useful in some tricky setups.  The
33 <replaceable>command</replaceable>
34 is executed in the same context window as the
35 <emphasis remap='B'>Schedule</emphasis>
36 command.  An optional integer argument
37 <replaceable>command_id</replaceable>
38 may be given in decimal, hexadecimal or octal format.  This id can
39 be used with the
40 <fvwmref cmd="Deschedule"/>
41 command to remove the scheduled command before it is executed.  If
42 no id is given, fvwm uses negative id numbers, starting with -1
43 and decreasing by one with each use of the
44 <emphasis remap='B'>Schedule</emphasis>
45 command.
46 Note that the
47 <emphasis remap='B'>Schedule</emphasis>
48 command and its arguments undergo the usual command line
49 expansion, and, when
50 <replaceable>command</replaceable>
51 is finally executed, it is expanded again.  It may therefore be
52 necessary to quote the parts of the command that must not be
53 expanded twice.</para>
55 <para>Note:  A window's id as it is returned with $[w.id] can be used as
56 the
57 <replaceable>command_id</replaceable>.
58 Example:</para>
60 <programlisting>
61 <fvwmref cmd="Current"/> Schedule 1000 $[w.id] <fvwmref cmd="WindowShade"/>
62 </programlisting>
65 <para>The
66 <emphasis remap='B'>Schedule</emphasis>
67 command also supports the optional keyword
68 <fvwmopt cmd="Schedule" opt="Periodic"/>
69 which indicates that the
70 <replaceable>command</replaceable>
71 should be executed every
72 <replaceable>delay_ms</replaceable>.
73 Example:</para>
75 <programlisting>
76 Schedule Periodic 10000 <fvwmref cmd="PipeRead"/> '[ -N "$MAIL" ] &amp;&amp; echo \
77      Echo You have mail'
78 </programlisting>
80 <para>Use the
81 <fvwmref cmd="Deschedule"/>
82 command to stop periodic commands.</para>
87 </section>