From: Thibault Godouet Date: Sat, 22 Feb 2025 14:41:43 +0000 (+0000) Subject: Better doc and logging on bootrun jobs. X-Git-Tag: ver3_4_0~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bddc0854b855512f8532a30fa07776564c7a97b2;p=thirdparty%2Ffcron.git Better doc and logging on bootrun jobs. --- diff --git a/database.c b/database.c index fa54fe7..884dd03 100644 --- a/database.c +++ b/database.c @@ -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); } diff --git a/doc/en/fcrontab.5.sgml b/doc/en/fcrontab.5.sgml index 6b7482c..49969fc 100644 --- a/doc/en/fcrontab.5.sgml +++ b/doc/en/fcrontab.5.sgml @@ -523,8 +523,10 @@ abbreviation. The options are (default value in parentheses): b boolean(false) - Run an &-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. + Run an &-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.