guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mcron service


From: Ludovic Courtès
Subject: Re: mcron service
Date: Fri, 24 Jun 2016 14:00:44 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Hello,

Danny Milosavljevic <address@hidden> skribis:

> I tried it out and can confirm that it still works. Nice!

Thanks for testing!

> Just curious, how would I specify the user to run the job under now?

Using Mathieu’s mcron branch (the ‘mcron2’ package, which is the default
here), this is done via #:user, so:

  #~(job '(next-hour '(1))
          do-something
          #:user "danny")

I’ll add an example of this in the manual.

> How do I read the guix texinfo manual (using info) when the manual is not 
> installed (i.e. read directly from the git checkout)?

Using the standalone Info reader, you can run:

  info -f ./doc/guix.info

and using Emacs:

  C-u C-h i ./doc/guix.info RET

> (Also, I wonder whether it would make any sense to be able to specify a list 
> of packages that have to be installed because of the scheduled job(s). 
> Otherwise it could for example be that updatedb isn't available, right?)

I kept this example simple, but if you want to make sure it finds
‘updatedb’, you can write it as:

  #~(job …
         (string-append #$findutils "/bin/updatedb --foo"))

And if you want to avoid issues related to shell quoting:

  #~(job …
         (lambda ()
           (execl (string-append #$findutils "/bin/updatedb")
                  "updatedb" "--foo")))

HTH!

Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]