unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Robert Vollmert <rob@vllmrt.net>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 36430@debbugs.gnu.org
Subject: bug#36430: mcron would benefit from a better way to test jobs
Date: Mon, 8 Jul 2019 09:18:32 +0200	[thread overview]
Message-ID: <325C9E85-468F-4EE3-93CC-C9F88D10E9CE@vllmrt.net> (raw)
In-Reply-To: <87h87xapnp.fsf@gnu.org>



> On 7. Jul 2019, at 16:24, Ludovic Courtès <ludo@gnu.org> wrote:
> 
> Hi Robert,
> 
> Robert Vollmert <rob@vllmrt.net> 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 “Lambda expression”.
>> I learned how to give it a descriptive name, but still there’s
>> 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 “Lambda
> expression”.  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 “feature that doesn’t actually work” 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’s what should be advertised in the
guix manual?


>> One major improvement would be to have:
>> 
>> 1. `herd schedule mcron` lists jobs with some kind of id
>> 2. `herd execute mcron <id>` runs the specific mcron job
>> 
>> Or perhaps, any mcron job could be turned into a simple argument-less
>> guile or shell script that’s shown in the schedule listing?
> 
> The commit I’m referring to above does exactly that.
> 
> Perhaps as a first step we could recommend this style more prominently
> in the manual?

I’ll 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’s a
> rather small and simple code base, so if you were looking for a
> rewarding hacking session for the week-end, it’s probably a good
> candidate.  ;-)

At this stage, there’s just too many small hacking sessions required
all over the place :). I’ll stick with filing bug reports for the
clear pain points if that’s ok?

Robert

  reply	other threads:[~2019-07-08  7:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-29  6:37 bug#36430: mcron would benefit from a better way to test jobs Robert Vollmert
2019-06-29 20:45 ` Jesse Gibbons
2019-07-07 14:26   ` Ludovic Courtès
2019-07-07 14:24 ` Ludovic Courtès
2019-07-08  7:18   ` Robert Vollmert [this message]
2019-07-08  9:54     ` Ludovic Courtès
2019-07-08 11:58       ` Robert Vollmert
2019-07-11 15:36         ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=325C9E85-468F-4EE3-93CC-C9F88D10E9CE@vllmrt.net \
    --to=rob@vllmrt.net \
    --cc=36430@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).