all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Pierre Neidhardt <ambrevar@gmail.com>
To: Jone <yeger9@gmail.com>
Cc: help-guix <help-guix@gnu.org>
Subject: Re: Error with mcron-configuration
Date: Sat, 07 Jul 2018 09:22:33 +0200	[thread overview]
Message-ID: <87fu0vse6e.fsf@gmail.com> (raw)
In-Reply-To: <CAH6o9V-ggEmvN0eEwWDhexggPEn5fiHBSpr6o40E1JHkbXP9Ug@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1410 bytes --]


Jone <yeger9@gmail.com> writes:

> (use-modules
>  ...
> (gnu services mcron)        ;; ← manual
>  ...
> (define fstrim-job              ;; ← manual
>   #~(job "10 10 * * 6"
>          "fstrim -a"))
> ...
> (services (cons*
>  ...
>   (mcron-service-type (mcron-configuration (jobs (list fstrim-job))))  ;; ←
> but here the question
>  ...

Did you use `mcron-service' around `mcron-service-type'?

>  ...
> (mcron-service (mcron-configuration (jobs (list fstrim-job))))  ;; ← manual
>  ...

`mcron-service' takes a list of jobs as argument, not an mcron-configuration.

From the manual:


--8<---------------cut here---------------start------------->8---
 -- Scheme Procedure : mcron-service JOBS [#:mcron MCRON]
     Return an mcron service running MCRON that schedules JOBS, a list
     of gexps denoting mcron job specifications.

     This is a shorthand for:
          (service mcron-service-type
                   (mcron-configuration (mcron mcron) (jobs jobs)))
--8<---------------cut here---------------end--------------->8---

So for you needs you'd need something like:

--8<---------------cut here---------------start------------->8---
(services (cons*
  (mcron-service (list fstrim-job))
  ...)
--8<---------------cut here---------------end--------------->8---

Hope that helps! :)

-- 
Pierre Neidhardt

Sorry, no fortune this time.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

  parent reply	other threads:[~2018-07-07  7:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-07  0:39 Error with mcron-configuration Jone
2018-07-07  1:40 ` Carlo Zancanaro
2018-07-07  7:22 ` Pierre Neidhardt [this message]
2018-07-07 22:25   ` Jone
2018-07-09 17:40     ` Jone
2018-07-09 18:14       ` Clément Lassieur

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=87fu0vse6e.fsf@gmail.com \
    --to=ambrevar@gmail.com \
    --cc=help-guix@gnu.org \
    --cc=yeger9@gmail.com \
    /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.