unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Joshua Branson <jbranso@dismail.de>
To: EuAndreh <eu@euandre.org>
Cc: help-guix <Help-Guix@gnu.org>
Subject: Re: How to call a local function from a mcron job?
Date: Sun, 20 Dec 2020 17:19:07 -0500	[thread overview]
Message-ID: <87zh2815pg.fsf@dismail.de> (raw)
In-Reply-To: <87czzvn2ao.fsf@euandre.org> (EuAndreh's message of "Sun, 29 Nov 2020 20:58:23 -0300")


Heyo EuAndreh!

Perhaps you could put your scheme function into a file in the same
directory as your config.scm.  Call said file "my-fn.scm" with the
content:

#+BEGIN_SRC scheme
(define-module (my-fn)
    #:export (my-fn))

(define (my-fn)
   ...)
#+END_SRC

Then the top of your config.scm should look like this:

#+BEGIN_SRC scheme
(add-to-load-path (dirname (current-filename)))

(use-modules
(gnu)
(guix)
(my-fn)
...)
#+END_SRC

That should solve your issue.  :)

--
Joshua Branson
Sent from Emacs and Gnus
  https://gnucode.me
  https://video.hardlimit.com/accounts/joshua_branson/video-channels
  https://propernaming.org
  "You can have whatever you want, as long as you help

enough other people get what they want." - Zig Ziglar


  reply	other threads:[~2020-12-20 22:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-29 23:58 How to call a local function from a mcron job? EuAndreh
2020-12-20 22:19 ` Joshua Branson [this message]
2020-12-22 23:44   ` EuAndreh via

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=87zh2815pg.fsf@dismail.de \
    --to=jbranso@dismail.de \
    --cc=Help-Guix@gnu.org \
    --cc=eu@euandre.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.
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).