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?

  • 4
    Exactly which cron are you using? Check the package version or changelog for hints. – Phil Hollenback Sep 1 '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 1 '11 at 22:16
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.