]> git.ipfire.org Git - thirdparty/fcron.git/commitdiff
Updated doc: todo, FAQ entry on anacron, runatreboot example
authorThibault Godouet <yo8192@users.noreply.github.com>
Fri, 24 Sep 2010 16:10:04 +0000 (17:10 +0100)
committerThibault Godouet <yo8192@users.noreply.github.com>
Fri, 24 Sep 2010 16:10:04 +0000 (17:10 +0100)
doc/en/faq.sgml
doc/en/fcrontab.5.sgml
doc/en/todo.sgml

index 375de75b0cebffc075592d59833b296846b2bae4..52cc3858805e25ff4e00d4478a92d7b8cad592c4 100644 (file)
@@ -351,17 +351,30 @@ and set appropriately the paths:</para>
                  <link linkend="fcrontab.5">&fcrontab;(5),</link> and choose the
                  type of line which is the most appropriate for your needs (this is
                  likely to be a @-line or a %-line).</para>
-              <para>However if you do want to emulate an anacron entry of the form:</para>
+               <para>On a Debian/Ubuntu, the default /etc/anacrontab looks like:<para>
+<programlisting>1       5       cron.daily       nice run-parts --report /etc/cron.daily
+7       10      cron.weekly      nice run-parts --report /etc/cron.weekly
+@monthly        15      cron.monthly nice run-parts --report /etc/cron.monthly
+</programlisting>
+               <para>A close fcron equivalent would be (see &optserial;):<para>
+<programlisting># Run once a day/week/month, and ensure only one of those tasks is run at a time:
+!reset
+!serial,nice(10)
+%daily * * run-parts --report /etc/cron.daily
+%weekly * * run-parts --report /etc/cron.weekly
+%monthly * * * run-parts --report /etc/cron.monthly</programlisting>
+               <para>Or you could go for something a bit more specific (see &optlavg;, &optnoticenotrun;):<para>
+<programlisting># Only run the tasks out of office-hours when the system load is low
+# and send an email to the user if fcron couldn't run the job:
+!reset
+!serial,lavg(0.5,1,1.5),noticenotrun,nice(10),mailto(admin@yourdomain.com)
+%daily * 0-9,18-23 run-parts --report /etc/cron.daily
+%weekly * 0-9,18-23 run-parts --report /etc/cron.weekly
+%monthly * 0-9,18-23 * run-parts --report /etc/cron.monthly</programlisting>
+              <para>Also, if you do want to emulate an anacron entry of the form:</para>
               <programlisting>0 delay job-identity /your/command</programlisting>
-              <para>then use something as:</para>
+              <para>then you can use something as:</para>
               <programlisting>@runonce delay /your/command</programlisting>
-              <para>If you use a non-zero anacron period/period_name (i.e. if you
-                  don't want your task to be run every day), then
-                  you should use a %daily, %monthly or %weekly line. If
-               this doesn't emulate an anacron entry as closely as you would like,
-               you may want to try a %hours or %days line, and/or &optrunfreq;.</para>
-               <para>In any case, you could benefit from using fcron options such as
-               &optserial; or &optlavg;.</para>
            </answer>
         </qandaentry>
         <qandaentry>
index 3da0cb05a329c6f4c47140111d1bb2adb6f63ba0..8f1f57a9e61974a17c9cc46c8c814413580626be 100644 (file)
@@ -766,6 +766,9 @@ permissions and environment (only root is allowed to use this option).</para>
                    <listitem>
                        <para><emphasis><type>boolean</type></emphasis>(<constant>false</constant>)</para>
                        <para>If set to true, the task will be run at system startup (i.e. immediately after the &argfirstsleep; delay -- by default, &firstsleep; seconds -- when the &fcron; daemon starts the first time after the OS has booted). This is in addition to the regular schedule which won't be modified by this option.</para>
+                        <para>For instance, if a program should be started automatically and run from 7am to 6pm, you could use the following dfcrontab definitions:</para>
+                        <programlisting>&amp;runatreboot 0 6 * * 1-5 start_my_program.sh
+& 0 7 * * 1-5 stop_my_program.sh</programlisting>
                        <para>&seealso; options &optvolatile;, &optrunonce;, &optrebootreset;.</para>
                    </listitem>
                </varlistentry>
index e587fde4ea3c9127d2b2979637bd849e636a6993..28ff39374761d2298d7efd1956916f2ed27dd9e0 100644 (file)
@@ -24,18 +24,12 @@ A copy of the license is included in gfdl.sgml.
       <sect2>
         <title>High priority</title>
         <itemizedlist>
-           <listitem>
-              <para>change copyright to ...,2008,2009,2010</para>
-           </listitem>
            <listitem>
               <para>could be worth checking fcron for memory leaks using specialized library (just in case...)</para>
            </listitem>
            <listitem>
               <para>option to put a maximum limit on the execution time of a task + terminate it if not finished yet + send email to let the user know</para>
            </listitem>
-           <listitem>
-              <para>@reboot: don't run the job the first time it is loaded by fcron after having been created -- otherwise we can't use fcron as a 'rc' start/stop script for users without root privileges</para>
-           </listitem>
            <listitem>
               <para>jitter feature: if 100 jobs to be started at the same minute, then make them start at a random second of that minute to limit load spikes (see BSD cron jitter feature)</para>
            </listitem>
@@ -48,9 +42,6 @@ A copy of the license is included in gfdl.sgml.
            <listitem>
               <para>find way to have the non translated pages of the French translation be updated automatically (changes, todo, etc -> copied from the English doc)</para>
            </listitem>
-           <listitem>
-              <para>add support Vixie cron's @reboot, @yearly, ... (in fileconf.c:read_file(), add a strncmp() at the beginning of the while() to do s/@reboot/@volatile,first(1) big value/, s/@yearly/0 0 1 1 */, ...) (+ add sthg such as a period of 0 so as a @reboot line can never be run again ?)</para>
-           </listitem>
         </itemizedlist>
       </sect2>
       <sect2>