4

My crontab looks like:

root@slack13x64:~# crontab -l -u dnd
# some variables
SHELL=/bin/bash
PATH=/bin:/usr/bin:/usr/local/bin:/home/dnd/bin
MAILTO=root

# Actual jobs
40 20 * * * /home/dnd/cron_jobs/some_job.sh
55 23 * * Fri /home/dnd/cron_jobs/other_job.py

Jobs run nearly OK, because crontab fails to set all variables:

Sep  1 20:40:01 slack13x64 crond[2325]: failed parsing crontab for user dnd: SHELL=/bin/bash
Sep  1 20:40:01 slack13x64 crond[2325]: failed parsing crontab for user dnd: PATH=/bin:/usr/bin:/usr/local/bin:/home/dnd/bin
Sep  1 20:40:01 slack13x64 crond[2325]: failed parsing crontab for user dnd: MAILTO=root

OS: slackware 13 x64, crontab 4.4

The question is what am I missing? Was support for setting initial env vars removed from crontab or user which runs this job should be assigned to some group?

Phil Hollenback
  • 14,947
  • 4
  • 35
  • 52
  • 4
    Exactly which cron are you using? Check the package version or changelog for hints. – Phil Hollenback Sep 01 '11 at 21:33
  • Well, I wasn't aware that there were many vendors for cron , and this seems to be a problem. This not-working one is `dillon's lightweight cron daemon`, and I was using `Vixie Cron` on other machine (that works fine). Please post it as an answer so I can accept it. – dev-null-dweller Sep 01 '11 at 22:16

1 Answers1

1

Moving my comment to a question because apparently it was the right answer!


Check what version of cron you are using. It's possible you have some weird non-vixie cron that doesn't accept the same settings or arguments.

Phil Hollenback
  • 14,947
  • 4
  • 35
  • 52