0

I want to run a cron every 5 minutes on Debian Buster.

My steps:

crontab -e
*/5 * * * * /usr/local/bin/squid-analyzer > /dev/null 2>&1
sudo service cron reload

Unfortunately this entry has no effect.

tail /var/log/syslog -f

The Command seems to be executed. Output:

Jan  6 12:20:01 CRON[8290]: (root) CMD (/usr/local/bin/squid-analyzer > /dev/null 2>&1)

The Website is not updated. Executing the Script manual in the bash works fine.

Playing around with varibales in my crontab like this has no impact:

HOME=/root
LOGNAME=root
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
LANG=en_US.UTF-8
#!/usr/bin/env bash
PWD=/root

Help is very appreachiated!

Gill-Bates
  • 489
  • 5
  • 17
  • 1
    The script itself seems to run, as indicated by the syslog. Maybe you might want to try removing the `> /dev/null 2>&1` so that the syslog shows what's happening? – Tim Schumacher Jan 06 '20 at 11:32

1 Answers1

0

Thanks! Issue solved. It was software-related. https://github.com/darold/squidanalyzer/issues/210

Gill-Bates
  • 489
  • 5
  • 17