crontab is not working

gahn ipfreak at
Sat Mar 5 04:36:42 UTC 2016

thanks matt:
yes i did remove that "root", but it still a no go. nothing happened. run that script manually with "bash /root/" with no issues.
i am puzzled.

    On Friday, March 4, 2016 11:03 PM, Matt Emmerton <matt at> wrote:

 > -----Original Message-----
> From: owner-freebsd-questions at [mailto:owner-freebsd-questions at] On Behalf Of gahn via freebsd-questions
> Sent: Friday, March 04, 2016 7:11 PM
> To: Freebsd General Questions
> Subject: crontab is not working
> hi:
> i am trying to test a crontab job for snmpwalk but it is not working:
> here is crontab:
> */1    *    *    *    *    root    /root/
> for the script, it is very simple:
> #!/usr/local/bin/bash
> /usr/local/bin/snmpwalk -v 2c -c public
> from the log, i can see this
> Mar  4 15:22:00 snails /usr/sbin/cron[88515]: (operator) CMD (/usr/libexec/save-entropy) Mar  4 15:22:00
> snails /usr/sbin/cron[88516]: (root) CMD (root^I/root/ Mar  4 15:23:00 snails /usr/sbin/cron[88531]:
> (root) CMD (root^I/root/ Mar  4 15:24:00 snails /usr/sbin/cron[88534]: (root) CMD (root^I/root/
> thanks.

Get rid of the "root<tab>" in the crontab entry.  The username is implicit and doesn't need to be specified.  cron is treating
that as part of the command which is why it's failing to run.

Matt Emmerton


More information about the freebsd-questions mailing list