aboutsummaryrefslogtreecommitdiff
path: root/gnu/home/services/mcron.scm
blob: 23be44ba07a2a8b6afa96d02ddb319260da76971 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2021, 2023 Andrew Tropin <andrew@trop.in>
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2023 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu home services mcron)
  #:use-module (gnu home services)
  #:use-module (gnu home services shepherd)
  #:use-module (gnu services mcron)               ;for the service mapping
  #:export (home-mcron-configuration
            home-mcron-service-type))

;;; Commentary:
;;
;; Service for the GNU mcron cron job manager.
;;
;; Example configuration, the first job runs mbsync once every ten
;; minutes, the second one writes "Mcron service" to ~/mcron-file once
;; every minute.
;;
;; (service home-mcron-service-type
;;            (home-mcron-configuration
;;             (jobs (list #~(job '(next-minute
;;                                  (range 0 60 10))
;;                                (lambda ()
;;                                  (system* "mbsync" "--all")))
;;                         #~(job next-minute-from
;;                                (lambda ()
;;                                  (call-with-output-file (string-append (getenv "HOME")
;;                                                                        "/mcron-file")
;;                                    (lambda (port)
;;                                      (display "Mcron service" port)))))))))
;;
;;; Code:

(define-syntax-rule (home-mcron-configuration fields ...)
  ;; Macro provided for backward compatibility.
  (for-home (mcron-configuration fields ...)))

(define home-mcron-service-type
  (service-type
   (inherit (system->home-service-type mcron-service-type))
   (default-value (for-home (mcron-configuration)))))

(define-service-type-mapping
  mcron-service-type => home-mcron-service-type)

;;; mcron.scm ends here
ython2-git-review): Likewise. * gnu/packages/password-utils.scm (python2-bcrypt): Likewise. * gnu/packages/protobuf.scm (python-protobuf, python2-protobuf): Likewise. * gnu/packages/statistics.scm (python-patsy, python2-patsy): Likewise. * gnu/packages/web.scm (python2-feedparser): Likewise. Hartmut Goebel 2016-09-16doc: "filesystem" -> "file system"...* doc/guix.texi: "filesystem" -> "file system" * gnu/packages/admin.scm: "filesystem" -> "file system" * gnu/packages/cdrom.scm: "filesystem" -> "file system" * gnu/packages/compression.scm: "filesystem" -> "file system" * gnu/packages/disk.scm: "filesystem" -> "file system" * gnu/packages/gnome.scm: "filesystem" -> "file system" * gnu/packages/irc.scm: "filesystem" -> "file system" * gnu/packages/linux.scm: "filesystem" -> "file system" * gnu/packages/mail.scm: "filesystem" -> "file system" * gnu/packages/mpd.scm: "filesystem" -> "file system" * gnu/packages/ocaml.scm: "filesystem" -> "file system" * gnu/packages/perl.scm: "filesystem" -> "file system" * gnu/packages/python.scm: "filesystem" -> "file system" * gnu/packages/search.scm: "filesystem" -> "file system" * gnu/packages/tls.scm: "filesystem" -> "file system" * gnu/services/mail.scm: "filesystem" -> "file system" John Darrington 2016-09-11gnu: mpd: Remove unused glib-or-gtk-build-system module....* gnu/packages/mpd.scm (define-module): Don't import 'glib-or-gtk-build-system'. Leo Famulari 2016-09-11gnu: Add sonata...* gnu/packages/mpd.scm (sonata): New variable. Signed-off-by: Leo Famulari <leo@famulari.name> Christopher Baines 2016-08-24gnu: ncmpc: Update to 0.25....* gnu/packages/mpd.scm (ncmpc): Update to 0.25. Leo Famulari 2016-08-24gnu: mpd-mpc: Update to 0.28....* gnu/packages/mpd.scm (mpd-mpc): Update to 0.28. Leo Famulari 2016-08-24gnu: mpd: Update to 0.19.19....* gnu/packages/mpd.scm (mpd): Update to 0.19.19. Leo Famulari 2016-08-24gnu: ncmpcpp: Update to 0.7.5....* gnu/packages/mpd.scm (ncmpcpp): Update to 0.7.5. Leo Famulari 2016-08-09gnu: mpd: Update to 0.19.18....* gnu/packages/mpd.scm (mpd): Update to 0.19.18. Leo Famulari 2016-07-12gnu: mpd: Update to 0.19.17....* gnu/packages/mpd.scm (mpd): Update to 0.19.17. Leo Famulari 2016-05-12gnu: Update module imports for asciidoc and doxygen....This is a followup to commit 0573a923def01e54bf104e0015ade44ab42f694f. * gnu/packages/algebra.scm, gnu/packages/bioinformatics.scm, gnu/packages/fcitx.scm, gnu/packages/fish.scm, gnu/packages/freedesktop.scm, gnu/packages/game-development.scm, gnu/packages/gcc.scm, gnu/packages/graphics.scm, gnu/packages/image.scm, gnu/packages/kodi.scm, gnu/packages/libreoffice.scm, gnu/packages/linux.scm, gnu/packages/messaging.scm, gnu/packages/mpd.scm, gnu/packages/music.scm, gnu/packages/rdf.scm, gnu/packages/serialization.scm, gnu/packages/version-control.scm, gnu/packages/web.scm, gnu/packages/wm.scm, gnu/packages/xdisorg.scm, gnu/packages/xiph.scm: Change imports of (gnu packages asciidoc) or (gnu packages doxygen) to (gnu packages documentation). Mark H Weaver 2016-04-30gnu: ncmpcpp: Remove bootstrapping phase....* gnu/packages/mpd.scm (ncmpcpp)[arguments]: Remove 'autogen' phase. [native-inputs]: Remove autoconf, automake, and libtool. Leo Famulari 2016-04-24gnu: ncmpcpp: Update to 0.7.4....* gnu/packages/mpd.scm (ncmpcpp): Update to 0.7.4. Leo Famulari 2016-04-05gnu: mpd: Update to 0.19.14....* gnu/packages/mpd.scm (mpd): Update to 0.19.14. Leo Famulari 2016-03-18gnu: Add python-mpd2....* gnu/packages/mpd.scm (python-mpd2, python2-mpd2): New variables. Leo Famulari 2016-02-22gnu: mpd: Update to 0.19.12....* gnu/packages/mpd.scm (mpd): Update t0 0.19.12. Leo Famulari 2016-02-22gnu: ncmpcpp: Udate to 0.7.3....* gnu/packages/mpd.scm (ncmpcpp): Update to 0.7.3. [inputs]: Add icu4c. Leo Famulari 2016-02-22gnu: ncmpcpp: Use 'modify-phases'....* gnu/packages/mpd.scm (ncmpcpp)[arguments]: Use 'modify-phases'. Leo Famulari 2015-09-26gnu: ncmpcpp: Update to 0.6.7....* gnu/packages/mpd.scm (ncmpcpp): Update to 0.6.7. Paul van der Walt 2015-07-09gnu: ncmpc: Update to 0.24....* gnu/packages/mpd.scm (ncmpc): Update to 0.24. Paul van der Walt 2015-07-09gnu: ncmpcpp: Update to 0.6.5....* gnu/packages/mpd.scm (ncmpcpp): Update to 0.6.5. Paul van der Walt 2015-07-09gnu: mpd-mpc: Update to 0.27....* gnu/packages/mpd.scm (mpd-mpc): Update to 0.27. Paul van der Walt 2015-07-09gnu: mpd: Update to 0.19.10....* gnu/packages/mpd.scm (mpd): Update to 0.19.10. Paul van der Walt 2015-07-09gnu: libmpdclient: Update to 2.10....* gnu/packages/mpd.scm (libmpdclient): Update to 2.10. Paul van der Walt 2015-03-09gnu: ncmpcpp: Move taglib from native-inputs....* gnu/packages/mpd.scm (ncmpcpp): Move TAGLIB from ‘native-inputs’ to ‘inputs’. Paul van der Walt 2015-03-07gnu: ncmpcpp: Enable taglib support....* gnu/packages/mpd.scm (ncmpcpp): Add --with-taglib configure flag. Paul van der Walt 2015-03-02gnu: mpd: Update to 0.19.9....* gnu/packages/mpd.scm (mpd): Update version to 0.19.9. Add boost and icu4c. Paul van der Walt 2015-03-02gnu: Add mpdscribble....* gnu/packages/mpd.scm (mpdscribble): New variable. David Thompson 2015-02-28gnu: mpd: Export package variables using define-public....* gnu/packages/mpd.scm: Use define-public for package variables. Remove #:exports from module declaration. David Thompson 2015-02-28gnu: Add mpd-mpc....* gnu/packages/mpd.scm (mpd-mpc): New variable. Paul van der Walt 2015-02-28gnu: ncmpcpp: Update to 0.6.2...* gnu/packages/mpd.scm (ncmpcpp): Update to version 0.6.2. Add boost, readline, autotools inputs. Paul van der Walt