Hello,

Danny Milosavljevic <dan...@scratchpost.org> 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