From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jack Hill Subject: Debugging an mcron job Date: Mon, 11 Mar 2019 16:05:12 -0400 (EDT) Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="925712948-1907961077-1552334707=:16784" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:45951) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3RQ9-00044q-JK for help-guix@gnu.org; Mon, 11 Mar 2019 16:21:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h3RAx-0002pt-IK for help-guix@gnu.org; Mon, 11 Mar 2019 16:05:32 -0400 Received: from minsky.hcoop.net ([104.248.1.95]:49310) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h3RAx-0002oI-D8 for help-guix@gnu.org; Mon, 11 Mar 2019 16:05:31 -0400 Received: from marsh.hcoop.net ([45.55.52.66]) by minsky.hcoop.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1h3RAx-0003pW-7K for help-guix@gnu.org; Mon, 11 Mar 2019 16:05:31 -0400 Content-ID: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: help-guix@gnu.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --925712948-1907961077-1552334707=:16784 Content-Type: text/plain; FORMAT=flowed; CHARSET=UTF-8 Content-Transfer-Encoding: 8BIT Content-ID: 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 ☺. --925712948-1907961077-1552334707=:16784--