[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Error with mcron-configuration
From: |
Pierre Neidhardt |
Subject: |
Re: Error with mcron-configuration |
Date: |
Sat, 07 Jul 2018 09:22:33 +0200 |
User-agent: |
mu4e 1.0; emacs 26.1 |
Jone <address@hidden> 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.
signature.asc
Description: PGP signature