0

I've got a couple of Cron jobs setup that I have piped through Cronic so that I only get emailed if there is an error.

Whenever I run the command in a terminal without Cronic the command executes correctly with no errors.

root $nice -n19 cronic /usr/local/bin/dirperms/mediadrive-dir-perms.sh

However ever now and again I'll get an email from CRON with an error as follows.

nice: cronic: No such file or directory

I'm having trouble working out why this error is occurring.

3
  • Set the full path of cronic in cron and command line. Cron run in very limited PATH. And probably you do not have this command in shell PATH Jun 11, 2015 at 14:54
  • And check that you've spelt it correctly - here, it's called chronic. Jun 11, 2015 at 16:17
  • 1
    Thanks for the advice. I've added the full path /usr/bin/chronic and installed chronic. It seems like there's actually two wrapper scripts that can be installed cronic and chronic. The latter being install via sudo apg-get install moreutils. Thanks for your help @RomeoNinov and @toby-speight Jun 11, 2015 at 20:42

1 Answer 1

1

Installed chronic via

sudo apt-get install moreutils

Then adapted CRON command to include the full path to chronic. ie.

* * * * * /usr/bin/chronic COMMAND

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .