[Top][All Lists]

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

mcron job with cd to directory?

From: ng0
Subject: mcron job with cd to directory?
Date: Wed, 17 May 2017 13:12:06 +0000

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/

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))
            (chdir "/srv/www/git/pragmatique")
            (system* "sh" "/root/"))))
(define %stagit-job2
  #~(job '(next-hour '(4))
            (chdir "/srv/www/git/ng0")
            (system* "sh" "/root/"))))

Of course we all know that the longterm fix is to write
an Guix service for stagit which allows multiple targets,
because stagit's is just that, an example ;)

reply via email to

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