]> git.ipfire.org Git - thirdparty/fcron.git/commitdiff
Added job 'options' ST for Serial Temporary in fcrondyn output.
authorThibault Godouet <yo8192@users.noreply.github.com>
Wed, 3 Jun 2026 22:52:16 +0000 (23:52 +0100)
committerThibault Godouet <yo8192@users.noreply.github.com>
Wed, 3 Jun 2026 22:52:16 +0000 (23:52 +0100)
doc/en/fcrondyn.1.sgml
fcrondyn_svr.c

index b60998dccc2479007b1b83c68c605b4e42670760..be2006c8eb358dd3d0553384caca37916b2fd273 100644 (file)
@@ -276,9 +276,54 @@ job. <emphasis><type>jobid</type></emphasis> is the one given by
            <varlistentry>
                <term>OPTIONS</term>
                <listitem>
-                   <para>List of main options which are set for the task.
-                    L for the jobs which run only under a given system Load average (option &optlavg;, &optlavg1;, &optlavg5; and &optlavg15;), LO (Load average Once) if only at most one instance of the task can be in the load average queue at a given time (option &optlavgonce;), S for serialized jobs (option &optserial;), SO for the jobs which will be serialized only for the next execution (Serial Once), and ES if several instances of the same job can run simultaneously (option &optexesev;).</para>
-               </listitem>
+
+                       <para>List of main options which are set for the task:</para>
+
+                       <variablelist>
+                       <varlistentry>
+                               <term>L</term>
+                               <listitem>
+                               <para>Job which runs only under a given system Load average (option &optlavg;, &optlavg1;, &optlavg5;, and &optlavg15;).</para>
+                               </listitem>
+                       </varlistentry>
+                       
+                       <varlistentry>
+                               <term>LO</term>
+                               <listitem>
+                               <para>Load average Once - if only at most one instance of the task can be in the load average queue at a given time (option &optlavgonce;).</para>
+                               </listitem>
+                       </varlistentry>
+                       
+                       <varlistentry>
+                               <term>S</term>
+                               <listitem>
+                               <para>For serialized jobs (option &optserial;).</para>
+                               </listitem>
+                       </varlistentry>
+                       
+                       <varlistentry>
+                               <term>ST</term>
+                               <listitem>
+                               <para>Serial Temporary - For the jobs which will be serialized only for the next execution (e.g. because of &optbootrun;).</para>
+                               </listitem>
+                       </varlistentry>
+                       
+                       <varlistentry>
+                               <term>SO</term>
+                               <listitem>
+                               <para>Serial Once - if only at most one instance of the task can be in the serial queue at a given time (option &optserialonce;).</para>
+                               </listitem>
+                       </varlistentry>
+                       
+                       <varlistentry>
+                               <term>ES</term>
+                               <listitem>
+                               <para>If several instances of the same job can run simultaneously (option &optexesev;).</para>
+                               </listitem>
+                       </varlistentry>
+                       </variablelist>
+
+                       </listitem>
            </varlistentry>
            <varlistentry>
                <term>LAVG</term>
@@ -376,4 +421,3 @@ mode: sgml
 sgml-parent-document:("fcron-doc.sgml" "book" "chapter" "sect1" "")
 End:
 -->
-
index 2599254b8b8b4f4f0815ee953dc228c32df69e8b..dfc6e48d53a6ec193cb79872bdd608040c33fa4e 100644 (file)
@@ -428,9 +428,20 @@ print_line(int fd, struct cl_t *line, unsigned char *details, pid_t pid,
         if (is_lavg(line->cl_option))
             i += snprintf(opt + i, sizeof(opt) - i, "L%.*s",
                           (is_lavg_sev(line->cl_option)) ? 0 : 1, "O");
-        if (is_serial(line->cl_option))
+        if (is_serial_once(line->cl_option)) {
+            /* will be added to the serial queue as a one-off (temporary) */
+            i += snprintf(opt + i, sizeof(opt) - i, "ST");
+        }
+        else if (is_serial(line->cl_option)) {
+            char *suffix = NULL;
+            if (!is_serial_sev(line->cl_option)) {
+                /* Can only be added to the serial queue at most once */
+                 suffix = "O";
+            }
+
             i += snprintf(opt + i, sizeof(opt) - i, "%.*sS%.*s", i, ",",
-                          (is_serial_sev(line->cl_option)) ? 0 : 1, "O");
+                          suffix ? 1 : 0, suffix);
+        }
         if (is_exe_sev(line->cl_option))
             i += snprintf(opt + i, sizeof(opt) - i, "%.*sES", i, ",");