When I call my script from crontab the variables are not returning any values. Whereas when I execute it manually (command line) it works fine. I also observed only the $start_time and $end_time are not returning values whereas the $auto_job_name returns "mytext". Could you please help on this?
Contents of my script.
#!/bin/bash
auto_job_name="mytext"
start_time=`grep $auto_job_name job_status.txt`
end_time=`grep $auto_job_name job_status.txt`
echo $auto_job_name
echo $start_time
echo $end_time