Re: How to automatically restart mcron (or register new jobs) on deploy?

2024-07-05 Thread Felix Lechner via
Hi Tomas, On Fri, Jul 05 2024, Tomas Volf wrote: > Is there a way to make this happen automatically? Do the new timers from the Shepherd development branch do that? Kind regards Felix

How to automatically restart mcron (or register new jobs) on deploy?

2024-07-05 Thread Tomas Volf
Hello, I created a new service-type which (among other things) extends mcron-service-type to register few jobs. It seems to work, with one exception. When I deploy the configuration, the mcron jobs are not registered. They are not being executed and they are not visible in the output of `herd

Re: mcron service and PATH (was: Home service for mbsync?)

2024-02-22 Thread Felix Lechner via
Hi, > you can find it here > I've attached my mbsync service > I just run mbsync as an mcron service. > +1! I also run it using mcron. > In my home services I have this: > I'm doing something similar First off, thanks for all your responses so far! On Thu, Feb 22 2024, Emma

Re: mcron service and PATH (was: Home service for mbsync?)

2024-02-22 Thread Emmanuel Beffara
Hi, De Tanguy LE CARROUR le 22/02/2024 à 14:51: > Quoting Emmanuel Beffara (2024-02-22 13:37:10) > > I recently noticed an issue with that: it seems that the command in the > > mcron > > job is called with an incomplete PATH. > > Yes, indeed. > > The "prob

Re: mcron service and PATH (was: Home service for mbsync?)

2024-02-22 Thread Tanguy LE CARROUR
Hi Emmanuel, Quoting Emmanuel Beffara (2024-02-22 13:37:10) > De Carlo Zancanaro le 22/02/2024 à 10:27: > > On Wed, Feb 21 2024, Felix Lechner via wrote: > > > Does anyone have an 'mbsync' home service, please? Thanks! > > I just run mbsync as an mcron service. I have a

mcron service and PATH (was: Home service for mbsync?)

2024-02-22 Thread Emmanuel Beffara
Hello, De Carlo Zancanaro le 22/02/2024 à 10:27: > On Wed, Feb 21 2024, Felix Lechner via wrote: > > Does anyone have an 'mbsync' home service, please? Thanks! > > I just run mbsync as an mcron service. I have a custom script, because I > do some weird stuff to update my m

Re: "Command not found" when using `home-mcron-service`

2024-01-15 Thread Tanguy LE CARROUR
Hi Oleg, Quoting Oleg Pykhalov (2024-01-15 18:13:13) > Tanguy LE CARROUR writes: > > `mcron` can then find `notmuch`, but `notmuch` has some hooks that depend > > on other commands; `mbsync` and `afew` in my case. For this, I cannot really > > provide the full path?

Re: "Command not found" when using `home-mcron-service`

2024-01-15 Thread Tanguy LE CARROUR
Hi Nils, Quoting Nils Landt (2024-01-15 19:11:25) > > > Tanguy LE CARROUR hat am 15.01.2024 13:30 CET > > geschrieben: > > > If I'm correct, setting the PATH environment variable in the mcron job > > > should fix it. > > > > You mean inside

Re: "Command not found" when using `home-mcron-service`

2024-01-15 Thread Nils Landt
> Tanguy LE CARROUR hat am 15.01.2024 13:30 CET > geschrieben: > > If I'm correct, setting the PATH environment variable in the mcron job > > should fix it. > > You mean inside the `#~(job …)`? Sorry, but… how would you do that?  Haven't tried it, but something lik

Re: "Command not found" when using `home-mcron-service`

2024-01-15 Thread Oleg Pykhalov
. at the top of a file: >> >> (use-modules (gnu packages mail)) > > I tried this one!  > The `string-append` version I mean. > > `mcron` can then find `notmuch`, but `notmuch` has some hooks that depend > on other commands; `mbsync` and `afew` in my c

Re: "Command not found" when using `home-mcron-service`

2024-01-15 Thread Tanguy LE CARROUR
t; preferred and cleaner: > > #$(file-append notmuch "/bin/notmuch") > > or: > (string-append #$notmuch "/bin/notmuch") > > Hint: make sure notmuch is defined, e.g. at the top of a file: > > (use-modules (gnu packages mail)) I tried

Re: "Command not found" when using `home-mcron-service`

2024-01-15 Thread Oleg Pykhalov
Tanguy LE CARROUR writes: > If I'm correct, setting the PATH environment variable in the mcron job > should fix it. > > You mean inside the `#~(job …)`? Sorry, but… how would you do that?  > And this means that I would have to do it for every single job? 樂 > Sound

Re: "Command not found" when using `home-mcron-service`

2024-01-15 Thread Tanguy LE CARROUR
Quoting Tanguy LE CARROUR (2024-01-15 13:30:35) > Quoting Nils Landt (2024-01-15 13:03:06) > > > Tanguy LE CARROUR hat am 15.01.2024 10:38 CET > > > geschrieben: > > > […] > > > `mbsync` is in my profile, but Mcron cannot find it. > > > Do I have t

Re: "Command not found" when using `home-mcron-service`

2024-01-15 Thread Tanguy LE CARROUR
Hi Nils, Quoting Nils Landt (2024-01-15 13:03:06) > > Tanguy LE CARROUR hat am 15.01.2024 10:38 CET > > geschrieben: > > > > ```scheme > > (gnu packages dav) ; vdirsyncer > > (gnu packages mail) ; notmuch > > ; […] > > (service home-mcron-se

Re: "Command not found" when using `home-mcron-service`

2024-01-15 Thread Nils Landt
> Tanguy LE CARROUR hat am 15.01.2024 10:38 CET > geschrieben: > > ```scheme > (gnu packages dav) ; vdirsyncer > (gnu packages mail) ; notmuch > ; […] > (service home-mcron-service-type > (home-mcron-configuration > (jobs (list >

"Command not found" when using `home-mcron-service`

2024-01-15 Thread Tanguy LE CARROUR
Dear Guix, I had stop using `home-mcron-service` some times ago, for I had a problem with my home shepherd. Now that this problem seems to be fixed 爛, I've tried to re-enable `home-mcron-service` and, while it runs, it cannot find the commands to execute!? I used to have this config: ```scheme

Re: Mcron jobs using with-mail-out

2023-05-24 Thread Maxim Cournoyer
Hi Felix, Felix Lechner via writes: > Hi, > > Does anyone have a working job specification for Mcron that uses > "with-mail-out"? [1] I have some trouble providing (mcron redirect) > inside the gexp. Thanks! Sorry, I don't, but I'd be interested in a concrete exa

Mcron jobs using with-mail-out

2023-05-21 Thread Felix Lechner via
Hi, Does anyone have a working job specification for Mcron that uses "with-mail-out"? [1] I have some trouble providing (mcron redirect) inside the gexp. Thanks! Kind regards Felix [1] https://www.gnu.org/software/mcron/manual/mcron.html#index-with_002dmail_002dout

Re: mcron <3 offlineimap

2022-09-21 Thread Sergiu Ivanov
Hi, zimoun [2022-09-21T10:31:45+0200]: > On Sat, 27 Aug 2022 at 10:45, jgart wrote: > >> has anyone tried running offlineimap on a(n) (m)cron? > > No. And I switched from offlineimap to isync (mbsync) for some parts. > And to public-inbox (so Git) for other parts. Same thing here (sans

Re: mcron <3 offlineimap

2022-09-21 Thread zimoun
Hi, On Sat, 27 Aug 2022 at 10:45, jgart wrote: > has anyone tried running offlineimap on a(n) (m)cron? No. And I switched from offlineimap to isync (mbsync) for some parts. And to public-inbox (so Git) for other parts. Cheers, simon

mcron <3 offlineimap

2022-08-27 Thread jgart
hi has anyone tried running offlineimap on a(n) (m)cron?

Help to debug a try with home-mcron-service-type on guix home

2022-06-29 Thread Sébastien Rey-Coyrehourcq
Hi guix ! I'm trying to config a mcron service type for mbsync, something simple, but there are few example on the web for the new home-mcron-service-type. I try something like this : (use-modules (gnu packages mail) (gnu packages tls) (gnu home services mcron

Re: Guix home mcron help

2022-06-24 Thread Trev
Quick update: I was able to get my mcron working in a way that seems to be the proper "guix home" way. It just took a lot of re-reading, trial & error. The downside to my solution is that I had to wrap my entire mailsync module in a #~(job #$(program-file)) gexp. Here's an

Guix home mcron help

2022-06-23 Thread Trev
Hey guys, I am trying to appreciate how to set up a guix home mcron using a separate module that I wrote that exports the job. My config lives in ~/.config/guix/home/config.scm My cron module lives in ~/.config/guix/home/cron/mailsync.scm The mailsync module export this: #+BEGIN_SRC scheme

Re: How to call a local function from a mcron job?

2020-12-22 Thread EuAndreh via
That makes sense. I'll try it later and report back. Thanks!

How to call a local function from a mcron job?

2020-11-29 Thread EuAndreh
run as a mcron job, and I tried: (define my-fn-job #(job "* * * * *" my-fn)) But that doesn't work. At reconfigure time, Guix complains about not knowing the variable 'my-fn': Unbound variable: my-fn I tried wrapping it in a '(with-imported-modules ...)' call, bu

Re: A simple battery level alert mcron job for your Guix, v2

2019-07-31 Thread Ricardo Wurmus
Maxim Cournoyer writes: > The following mcron job accomplish this. I've implemented it in Guile > Scheme this time around and was puzzled that I had to use program-file > to make it work, otherwise srfi-26's cut would error on undefined symbol > '<>'. > > The problem w

Re: A simple battery level alert mcron job for your Guix, v2

2019-07-31 Thread Maxim Cournoyer
mcron job accomplish this. I've implemented it in Guile Scheme this time around and was puzzled that I had to use program-file to make it work, otherwise srfi-26's cut would error on undefined symbol '<>'. The problem was that passing the code as a lambda would have the syntax imported not a t

A simple battery level alert mcron job for your Guix

2019-07-21 Thread Maxim Cournoyer
20%. It relies on "acpi" to get the battery level and "beep" to make use of the PC speaker. --8<---cut here---start->8--- (use-service-module ... base mcron ...) (use-package-modules ... linux terminals ; f

Re: Debugging an mcron job

2019-04-01 Thread Jack Hill
Is that a reasonable solution? I’m (very) late to the party but what you did looks like the right thing to me. No worries, I still find the sanity check helpful. PS: Good to see you’re building interesting stuff with this! Me too :) I've really enjoyed working with the Guix and mcron building blocks

Re: Debugging an mcron job

2019-04-01 Thread Ludovic Courtès
Hello, Jack Hill skribis: > On Tue, 12 Mar 2019, Jack Hill wrote: > >> I've figured out what was going wrong with my job (by redirecting >> the output to a file). It couldn't verify the remote host's >> certificate: >> >> urllib2.URLError: > certificate verify failed (_ssl.c:726)> >> >> Now to

Re: Debugging an mcron job

2019-04-01 Thread Ludovic Courtès
Hello, Jack Hill skribis: > On Tue, 12 Mar 2019, Jack Hill wrote: > >> I've figured out what was going wrong with my job (by redirecting >> the output to a file). It couldn't verify the remote host's >> certificate: >> >> urllib2.URLError: > certificate verify failed (_ssl.c:726)> >> >> Now to

Re: Debugging an mcron job

2019-03-12 Thread Jack Hill
On Tue, 12 Mar 2019, Jack Hill wrote: I've figured out what was going wrong with my job (by redirecting the output to a file). It couldn't verify the remote host's certificate: urllib2.URLError: verify failed (_ssl.c:726)> Now to figure out why. I have nss-certs in my system packages.

Re: Debugging an mcron job

2019-03-12 Thread Jack Hill
I've figured out what was going wrong with my job (by redirecting the output to a file). It couldn't verify the remote host's certificate: urllib2.URLError: Now to figure out why. I have nss-certs in my system packages. Best, Jack

Debugging an mcron job

2019-03-11 Thread Jack Hill
Hi Guix, I'm looking for help or tips on debugging an mcron job. My goal is to run a site-specific telemetry script that I have packaged [0] in my channel. The script collects some information and sends it to a remote server. I am trying to run the script as an mcron job via a service I

Re: mcron

2018-08-05 Thread Pierre Neidhardt
Yes, Vixie syntax is supported there too! See "(mcron) Vixie Syntax". But if you can grasp the Lisp syntax instead, I'd recommend you for it, it's much more flexible. After all, it's the sole raison-d'être of mcron with regard to cron :) I think your solution to "every N min

Re: mcron

2018-08-04 Thread Benjamin Slade
Many thanks, Pierre. Can one also mix Vixie-style things in `~/.config/cron/` ? It probably doesn't matter since I think I've figured out mcron native syntax. I was looking everywhere in "(mcron) Top" for an example of "do X every N minutes", but finally figured out that th

Re: mcron

2018-08-04 Thread Pierre Neidhardt
No, mcron at the user-level is even simpler, simply tweak your configuration file and start `mcron`. Example job in ~/.config/cron/job.guile: --8<---cut here---start->8--- (job '(next-hour (range 0 24 3)) "updatedb") --8<

Re: mcron

2018-08-04 Thread Benjamin Slade
On 2018-08-04T02:44:24-0600, Pierre Neidhardt wrote: > Not sure I can help much here because I personally run help cron from my user > session, i.e. with "mcron &" in my ".profile". I declare the jobs in > "~/.config/cron/job.guile". > Ma

Re: mcron

2018-08-04 Thread Pierre Neidhardt
Not sure I can help much here because I personally run help cron from my user session, i.e. with "mcron &" in my ".profile". I declare the jobs in "~/.config/cron/job.guile". Maybe you could try that for the user-level jobs and see if it works in that

mcron

2018-08-03 Thread Benjamin Slade
nnI'm having trouble getting mcron to work. I have configured it in /etc/config.scm similarly to the example given in the manual, but it the mcron service seems to immediately stop. I've tried `sudo herd enable mcron` and `sudo herd start mcron`, which work, but then when I check its status, I

Re: Error with mcron-configuration

2018-07-09 Thread Clément Lassieur
Jone writes: > *> But only it still does not work!* > > With current system version all Ok: > > #> sudo herd status mcron > Status of mcron: > It is started. > Running value is 298. > It is enabled. > Provides (mcron). > R

Re: Error with mcron-configuration

2018-07-09 Thread Jone
*> But only it still does not work!* With current system version all Ok: #> sudo herd status mcron Status of mcron: It is started. Running value is 298. It is enabled. Provides (mcron). Requires (user-processes). Conflicts with (). Will be respawned. ps ax | grep mcron

Re: Error with mcron-configuration

2018-07-07 Thread Pierre Neidhardt
Jone writes: > (use-modules > ... > (gnu services mcron);; ← manual > ... > (define fstrim-job ;; ← manual > #~(job "10 10 * * 6" > "fstrim -a")) > ... > (services (cons* > ... > (mcron-ser

Re: Error with mcron-configuration

2018-07-06 Thread Carlo Zancanaro
Hey Jone! ... (mcron-service-type (mcron-configuration (jobs (list fstrim-job ... This is close, but very slightly wrong. `mcron-service-type` isn't a procedure, so you can't call it like that. You have to use `service`: (service mcron-service-type (mcron

Re: mcron or mcron2?

2017-11-23 Thread Leo Famulari
On Thu, Nov 23, 2017 at 11:02:48AM -0600, Caleb Herbert wrote: > On Thu, 2017-11-23 at 10:01 -0500, Leo Famulari wrote: > > The GuixSD mcron service uses mcron2, so I think that is probably the > > best one :) > > Which is more likely to work on a foreign distro? (Tri

Re: mcron job with cd to directory?

2017-05-17 Thread Clément Lassieur
t;https://www.gnu.org/software/guix/manual/html_node/Scheduled-Job-Execution.html>. >> >> Ludo’. >> > > Thanks! This fixed at least the respawn-death of mcron. Now I just have to > see if it does what I want. I have found the '--schedule' option of mcron very usef

Re: mcron job with cd to directory?

2017-05-17 Thread ng0
it && 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, &

Re: mcron job with cd to directory?

2017-05-17 Thread Ludovic Courtès
Howdy ng0, ng0 <n...@pragmatique.xyz> skribis: > 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?