From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Subject: bug#36430: mcron would benefit from a better way to test jobs Date: Sun, 07 Jul 2019 16:24:26 +0200 Message-ID: <87h87xapnp.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:48287) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hk86B-00074U-0L for bug-guix@gnu.org; Sun, 07 Jul 2019 10:25:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hk86A-0005vF-0X for bug-guix@gnu.org; Sun, 07 Jul 2019 10:25:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:48436) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hk869-0005ux-ST for bug-guix@gnu.org; Sun, 07 Jul 2019 10:25:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hk869-0008C5-Ku for bug-guix@gnu.org; Sun, 07 Jul 2019 10:25:01 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: (Robert Vollmert's message of "Sat, 29 Jun 2019 08:37:29 +0200") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Robert Vollmert Cc: 36430@debbugs.gnu.org Hi Robert, Robert Vollmert skribis: > Defined a mcron job in config.scm scheduled to run once a day, > with a scheme expression. How do I test this? > > herd schedule mcron lists the job as merely a =E2=80=9CLambda expression= =E2=80=9D. > I learned how to give it a descriptive name, but still there=E2=80=99s > no script linked that I can run by hand. Commit 89fdd9ee0cc8817283449b33a8c1a2604c575c7e changes the rottlog job in a simple way so we see an actual command rather than =E2=80=9CLambda expression=E2=80=9D. I would recommend using this style to improve transparency. > One major improvement would be to have: > > 1. `herd schedule mcron` lists jobs with some kind of id > 2. `herd execute mcron ` runs the specific mcron job > > Or perhaps, any mcron job could be turned into a simple argument-less > guile or shell script that=E2=80=99s shown in the schedule listing? The commit I=E2=80=99m referring to above does exactly that. Perhaps as a first step we could recommend this style more prominently in the manual? Further improvements should probably go into mcron itself. It=E2=80=99s a rather small and simple code base, so if you were looking for a rewarding hacking session for the week-end, it=E2=80=99s probably a good candidate. ;-) Thanks, Ludo=E2=80=99.