Issue:

In Linux Environment, script scheduled in Crontab is not working.

Impact:

Not able to do any automatic healthcheck, schedule a backup etc.. in Production Database and Application.

Solution:

Need to set environment variable before the shell script scheduled

for example,

crontab -l

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

*/10 * * * * sh /u03/scripts/DBHealthScripts.sh

After this, the shell script file was able to execute from crontab.

Recent Posts

Start typing and press Enter to search