Why crontab is not executing shell script?

Solution Verified - Updated -

Issue

  • Why crontab is not executing shell srcipt.
  • The shell script works fine when run it manually.
  • The crontab file: /etc/crontab looks like:
SHELL=/bin/bash  
PATH=/sbin:/bin:/usr/sbin:/usr/bin  
MAILTO=root@localhost.localdomain  
HOME=/root

\# run-parts  
01 \* \* \* \* root run-parts /etc/cron.hourly  
02 4 \* \* \* root run-parts /etc/cron.daily  
00 0 \* \* \* root yum update -y  
22 04 \* \* 0 root run-parts /etc/cron.weekly  
42 04 01 \* \* root run-parts /etc/cron.monthly  
16 00 \* \* \* root /home/timemanager/www/global\_protected/cron/employee\_import

Environment

  • Red Hat Enterprise Linux
  • Crontab

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content