From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Vollmert Subject: bug#36430: mcron would benefit from a better way to test jobs Date: Mon, 8 Jul 2019 09:18:32 +0200 Message-ID: <325C9E85-468F-4EE3-93CC-C9F88D10E9CE@vllmrt.net> References: <87h87xapnp.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:44146) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkNvT-0000lS-Ei for bug-guix@gnu.org; Mon, 08 Jul 2019 03:19:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hkNvS-00052B-D0 for bug-guix@gnu.org; Mon, 08 Jul 2019 03:19:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:48861) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hkNvS-000523-9W for bug-guix@gnu.org; Mon, 08 Jul 2019 03:19:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hkNvS-000089-2c for bug-guix@gnu.org; Mon, 08 Jul 2019 03:19:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87h87xapnp.fsf@gnu.org> 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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 36430@debbugs.gnu.org > On 7. Jul 2019, at 16:24, Ludovic Court=C3=A8s wrote: >=20 > Hi Robert, >=20 > Robert Vollmert skribis: >=20 >> Defined a mcron job in config.scm scheduled to run once a day, >> with a scheme expression. How do I test this? >>=20 >> 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. >=20 > 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. I understand that passing an executable works better. But that also loses the feature of allowing to write a script in place advertised by the lambda variant. I find that kind of =E2=80=9Cfeature that doesn=E2=80=99t actually = work=E2=80=9D to be quite painful. A way to get the best of both worlds (within guix) would be to use program-file / gexp, so maybe that=E2=80=99s what should be advertised = in the guix manual? >> One major improvement would be to have: >>=20 >> 1. `herd schedule mcron` lists jobs with some kind of id >> 2. `herd execute mcron ` runs the specific mcron job >>=20 >> 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? >=20 > The commit I=E2=80=99m referring to above does exactly that. >=20 > Perhaps as a first step we could recommend this style more prominently > in the manual? I=E2=80=99ll see if I can get the gexp variant to work, and would = provide a manual patch if successful. > 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. ;-) At this stage, there=E2=80=99s just too many small hacking sessions = required all over the place :). I=E2=80=99ll stick with filing bug reports for = the clear pain points if that=E2=80=99s ok? Robert