From: ng0 <ng0@pragmatique.xyz>
To: help-guix@gnu.org
Subject: mcron job with cd to directory?
Date: Wed, 17 May 2017 13:12:06 +0000 [thread overview]
Message-ID: <20170517131206.5dt6bv4fyglvxcrn@abyayala> (raw)
Does someone know how you could re-create this:
(crontab -l of root)
# Regnerate stagit indexes every hour:
0 * * * * (cd /var/www/git && echo `pwd` && /root/git_pragmatique_xyz.sh)
in mcron?
I have some cronjobs where the initial
current-working-dir must be a specific directory.
I think I am missing (lambda) in what I have written below,
but the mcron documentation just
(define %stagit-job1
#~(job '(next-hour '(4))
(and
(chdir "/srv/www/git/pragmatique")
(system* "sh" "/root/git_pragmatique.xyz.sh"))))
(define %stagit-job2
#~(job '(next-hour '(4))
(and
(chdir "/srv/www/git/ng0")
(system* "sh" "/root/git_ng0.sh"))))
Of course we all know that the longterm fix is to write
an Guix service for stagit which allows multiple targets,
because stagit's example.sh is just that, an example ;)
--
https://pragmatique.xyz
PGP: https://people.pragmatique.xyz/ng0/
next reply other threads:[~2017-05-17 13:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-17 13:12 ng0 [this message]
2017-05-17 20:04 ` mcron job with cd to directory? Ludovic Courtès
2017-05-17 20:15 ` ng0
2017-05-17 21:01 ` 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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170517131206.5dt6bv4fyglvxcrn@abyayala \
--to=ng0@pragmatique.xyz \
--cc=help-guix@gnu.org \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).