Any reason you are not using systemd triggers? Works the same as cron and log output is redirected to journald.
N. -----Original Message----- From: "M. P. Ashton" <d...@imap.cc> Sent: 10/16/2014 2:32 AM To: "nix-dev" <nix-dev@lists.science.uu.nl> Subject: Re: [Nix-dev] Crontab and mail / ssmtp troubles Thanks, I'll try to find that discussion. This was on the stable branch; maybe it's different in the git head? On Wed, Oct 15, 2014, at 04:12 PM, Luca Bruno wrote: > There was some discussion about this. The problem is probably a missing > /var/spool for each user, or anyway something about permissions. I've > tracked down the issue once but never worked on it since I wasn't > directly > interested on it. > > On Wed, Oct 15, 2014 at 10:07 PM, M. P. Ashton <d...@imap.cc> wrote: > > > I'm having trouble getting a rather simple crontab running on a new > > NixOS installation. > > > > The crontab is supposed to run a shell script in a user account. It > > doesn't work. So I tried just having it run "echo test". That got me > > this in the journal: > > > > Oct 15 15:54:01 bode cron[22272]: (mpashton) CMD (echo test) > > Oct 15 15:54:01 bode cron[22271]: (mpashton) MAIL (mailed 5 bytes of > > output but got status 0x0001 > > ) > > > > Sadly I can't see cron's mail output, because mail doesn't work either. > > I installed ssmtp using networking.defaultMailServer.directDelivery = > > true, but none of my mail programs, like mutt and mail, seem to be able > > to find sendmail. For example: > > > > [mpashton@bode:~]$ echo "Hi there" |mail -s "Test subject" > > d...@gtf.org > > Cannot open mailer: No such file or directory > > > > I can force Mutt to see sendmail by putting this in .muttrc: > > > > set sendmail="sendmail"; > > > > Then it works fine and I can send mail successfully. So, obviously Mutt > > is pointing to something like /usr/sbin/sendmail by default. Maybe > > crontab is too? But I would have thought this would be patched already. > > > > Crontab is below. Notice I tried adding paths -- this did not help. > > > > Thanks to anyone who can offer advice here! > > > > --Michael > > > > * * * > > > > SH=/run/current-system/sw/bin/sh > > MAILTO=d...@gtf.org > > PATH=/run/current-system/sw/sbin > > > > 10 02 * * * echo test > > _______________________________________________ > > nix-dev mailing list > > nix-dev@lists.science.uu.nl > > http://lists.science.uu.nl/mailman/listinfo/nix-dev > > > > > > -- > www.debian.org - The Universal Operating System _______________________________________________ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
_______________________________________________ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev