From: Jack Hill <jackhill@jackhill.us>
To: help-guix@gnu.org
Subject: Debugging an mcron job
Date: Mon, 11 Mar 2019 16:05:12 -0400 (EDT) [thread overview]
Message-ID: <alpine.DEB.2.20.1903111603580.16784@marsh.hcoop.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 1591 bytes --]
Hi Guix,
I'm looking for help or tips on debugging an mcron job. My goal is to run
a site-specific telemetry script that I have packaged [0] in my channel.
The script collects some information and sends it to a remote server. I am
trying to run the script as an mcron job via a service I created in my
channel [1].
[0] https://gitlab.oit.duke.edu/jackhill/guix-at-duke/blob/0ed0a8e7530ef32b9e268d43b36944e38defa5f1/guix-at-duke/packages/endpoint-management.scm#L98-140
[1] https://gitlab.oit.duke.edu/jackhill/guix-at-duke/blob/0ed0a8e7530ef32b9e268d43b36944e38defa5f1/guix-at-duke/services/endpoint-management.scm
So far, this looks good, and after pulling my channel, reconfiguring, and
restarting mcron, I can see my job in herd schedule mcron:
"""
# herd schedule mcron
Tue Mar 12 00:51:00 2019 -0400
/gnu/store/61692zjpkhy3jqv4a7jk1k8a14k6yn8k-planisphere-report-0-0.1b606af/bin/planisphere-report
…
"""
However, this doesn't appear to work because after the appointed time, the
remote server is not updated. If I run the planisphere-report command by
hand, the remote server is updated.
If I replace the planisphere-report command in my job with
"/run/current-system/profile/bin/touch /tmp/test-file", test-file is
indeed touched, so I know that the jobs are running.
Being fairly new to Guix, and extremely new to mcron, I don't know how to
debug further. Are jobs run in such a way that they don't have network
access? How can I see any errors or output?
Best,
Jack
P.S. I'm happy to accept any comments about how to improve the code in my
channel as well ☺.
next reply other threads:[~2019-03-11 20:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-11 20:05 Jack Hill [this message]
2019-03-12 19:24 ` Debugging an mcron job Jack Hill
2019-03-12 20:33 ` Jack Hill
2019-03-12 21:26 ` Jack Hill
2019-04-01 20:05 ` Ludovic Courtès
2019-04-01 20:05 ` Ludovic Courtès
2019-04-01 20:52 ` Jack Hill
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.20.1903111603580.16784@marsh.hcoop.net \
--to=jackhill@jackhill.us \
--cc=help-guix@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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.