]> git.ipfire.org Git - thirdparty/fcron.git/commitdiff
Better doc and logging on bootrun jobs.
authorThibault Godouet <yo8192@users.noreply.github.com>
Sat, 22 Feb 2025 14:41:43 +0000 (14:41 +0000)
committerThibault Godouet <yo8192@users.noreply.github.com>
Sat, 22 Feb 2025 14:41:43 +0000 (14:41 +0000)
database.c
doc/en/fcrontab.5.sgml

index fa54fe7b556cc33e257de9542d10829a49a6484b..884dd03c9090f83b1c6dc8d4eb5a40634642bc55 100644 (file)
@@ -185,7 +185,7 @@ run_normal_job(cl_t *line, int info_fd)
         send_msg_fd(info_fd, "Job '%s' started.", line->cl_shell);
     }
     else {
-        warn_fd(info_fd, "    process already running: %s's '%s'",
+        warn_fd(info_fd, "    Skipping execution of already running job: %s's '%s'",
                 line->cl_file->cf_user, line->cl_shell);
     }
 
@@ -1463,7 +1463,7 @@ set_next_exe_startup(struct cl_t *cl, const int context,
         else {
             /* job has been stopped during execution :
              * launch it again */
-            warn("Job '%s' did not finish : running it again.", cl->cl_shell);
+            warn("Job '%s' did not finish : adding it to the serial queue to run it again.", cl->cl_shell);
             set_serial_once(cl->cl_option);
             add_serial_job(cl, -1);
         }
@@ -1523,13 +1523,16 @@ set_next_exe_startup(struct cl_t *cl, const int context,
                 else {
                     /* run bootrun jobs */
                     cl->cl_remain = cl->cl_runfreq;
-                    debug("   boot-run '%s'", cl->cl_shell);
+                    debug("   bootrun job should have run during down time '%s'", cl->cl_shell);
                     if (!is_lavg(cl->cl_option)) {
+                        explain("   Adding bootrun job to the serial queue: '%s'", cl->cl_shell);
                         set_serial_once(cl->cl_option);
                         add_serial_job(cl, -1);
                     }
-                    else
+                    else {
+                        explain("   Adding bootrun job to the lavg queue: '%s'", cl->cl_shell);
                         add_lavg_job(cl, -1);
+                    }
                 }
                 set_next_exe(cl, STD, -1);
             }
index 6b7482c870c1cee64f1f3b25a0b0c1cd1e36ef08..49969fcc6afaaaee2211116d69005cd749b098ca 100644 (file)
@@ -523,8 +523,10 @@ abbreviation. The options are (default value in parentheses):</para>
                    <term>b</term>
                    <listitem>
                        <para><emphasis><type>boolean</type></emphasis>(<constant>false</constant>)</para>
-                       <para>Run an &amp;-line (i.e. based on date and time) at &fcron;'s startup (or system's resume after suspend/hibernation) if it should
-have run during system down time.</para>
+                       <para>Run an &amp;-line (i.e. based on date and time) at &fcron;'s startup (or system's
+                       resume after suspend/hibernation) if it should have run during system down time.
+                       More precisely, such jobs will be added to the lavg queue (if one of the lavg option was set)
+                       or the serial queue to avoid too many jobs starting at the same time on fcron's startup.</para>
                    </listitem>
                </varlistentry>