Skip to content

Commit

Permalink
Add documentation on option runatresume.
Browse files Browse the repository at this point in the history
  • Loading branch information
yo8192 committed Jun 16, 2024
1 parent 87e8f95 commit 5f89132
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions doc/en/fcrontab.5.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ for most uses.</para>
a new one every time the OS reboots. This is very similar to the option &optvolatile;
but based on the OS reboots instead of fcron restarts.
You may also want to use option &optfirst; if you use fcron that way.</para>
<para>&seealso; options &optfirst;, &optvolatile;, &optrunonce;, &optrunatreboot;.</para>
<para>&seealso; options &optfirst;, &optvolatile;, &optrunonce;, &optrunatreboot;, &runatresume;.</para>
</listitem>
</varlistentry>

Expand All @@ -788,10 +788,22 @@ 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>
<para>For instance, if a program should be started automatically right after boot and run from 7am to 6pm, you could use the following fcrontab definitions:</para>
<programlisting>&amp;runatreboot 0 6 * * 1-5 start_my_program.sh
&amp; 0 7 * * 1-5 stop_my_program.sh</programlisting>
<para>&seealso; options &optvolatile;, &optrunonce;, &optrebootreset;.</para>
<para>&seealso; options &optvolatile;, &optrunonce;, &runatresume;, &optrebootreset;.</para>
</listitem>
</varlistentry>

<varlistentry id="fcrontab.5.runatresume">
<term>runatresume</term>
<listitem>
<para><emphasis><type>boolean</type></emphasis>(<constant>false</constant>)</para>
<para>If set to true, the task will be run at system resume (from suspend, or hibernation). 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 right after a system resume, and run from 7am to 6pm, you could use the following fcrontab definitions:</para>
<programlisting>&amp;runatresume 0 6 * * 1-5 start_my_program.sh
&amp; 0 7 * * 1-5 stop_my_program.sh</programlisting>
<para>&seealso; options &optvolatile;, &optrunonce;, &runatreboot;, &optrebootreset;.</para>
</listitem>
</varlistentry>

Expand All @@ -811,7 +823,7 @@ linkend="uptent">lines based on elapsed system up time</link>).</para>
<listitem>
<para><emphasis><type>boolean</type></emphasis>(<constant>false</constant>)</para>
<para>Do not re-schedule the task after it has run once, until the next OS reboot (if &optvolatile; is not set) or until the next &fcron; daemon restart (if &optvolatile; is set).</para>
<para>&seealso; options &optvolatile;, &optrebootreset;, &optrunatreboot;.</para>
<para>&seealso; options &optvolatile;, &optrebootreset;, &optrunatreboot;, &runatresume;.</para>
</listitem>
</varlistentry>

Expand Down

0 comments on commit 5f89132

Please sign in to comment.