From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jesse Gibbons Subject: bug#36430: mcron would benefit from a better way to test jobs Date: Sat, 29 Jun 2019 14:45:54 -0600 Message-ID: <20190629144536.590b1b7f@gmail.com> 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]:38847) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hhKFX-0002m8-C7 for bug-guix@gnu.org; Sat, 29 Jun 2019 16:47:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hhKFV-0005dh-4A for bug-guix@gnu.org; Sat, 29 Jun 2019 16:47:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59645) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hhKFS-0005c7-3q for bug-guix@gnu.org; Sat, 29 Jun 2019 16:47:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hhKFR-0003zM-UB for bug-guix@gnu.org; Sat, 29 Jun 2019 16:47:01 -0400 In-Reply-To: Sender: "Debbugs-submit" Resent-Message-ID: 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: rob@vllmrt.net Cc: 36430@debbugs.gnu.org > My issue: > Defined a mcron job in config.scm scheduled to run once a day, > with a scheme expression. How do I test this? Write the mcron job for a local installation of mcron first for testing purposes, then move it into config.scm. That's how I do it. > 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. > > 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? > > Thoughts? mcron --schedule=3Dcount gives you a listing of each scheduled job and when it will next be run. I would expect "herd schedule mcron" runs that command. I don't know about scheduling a function, but if the scheduled job is a string it can be copied/pasted into a terminal. mcron is super buggy in my experience. If I power my laptop off overnight it will skip all jobs scheduled for the day of the month, even if they are scheduled for after I power it back on. And it doesn't have a way to easily schedule for a given day of the week.