Uly.me

cloud engineer

  • Home
  • About
  • Archives
Home/Linux/Cronjob Not Running

April 16, 2018

Cronjob Not Running

I had issues with cron. The jobs were not running, so it seemed. It turned out that they were in fact running. The jobs were firing off based on schedule. The problem was, cron didn’t have the correct path to the commands. I realized this when I looked at a couple of log files, in /var/mail and /var/log/syslog to look for clues. The fix was to include the path in cron.

Edit cron.

crontab -e

crontab -e

Add the shell and path at the top of the file.

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

Filed Under: Linux Tagged With: cron

Have content delivered to your mail. Subscribe below.

About Me

I'm Ulysses, Cloud Engineer at Cardinal Health based in Columbus. This blog is about Linux and Cloud technology. When off the grid, I enjoy riding my electric skateboard. I've surfed, snowboarded and played the saxophone in the past. I hope you find this website helpful. It's powered by WordPress and hosted on AWS LightSail.

  • Cloud
  • Linux
  • Git

Copyright © 2012–2021