I plan to run a script which will run in background and at predefined times send mails to user . I dont have acees to autosys/ Cron / at jobs
My loop works like this
while (true)
do
getx_time=`date +%H%M`
if [ $getx_time == "$file1_time" ]; then
script1.sh
mail_sent_flag=1
elif [ $getx_time == "$file2_time" ]; then
script2.sh
mail_sent_flag=1
elif [ $getx_time == "$file3_time" ]; then
script3.sh
mail_sent_flag=1
if mail_sent_flag=1
sleep 60 # sleep for a minute so that i don't get bomabred in that minute
fi
fi
done
Script 1 , Script2 , Script 3 sends mail to my login id
and the time suppose it 0100 , thn i start getting bombarded with mails , I triued using sleep command but of no help
I want only one mail for each of the above 3 cases.
Pls suggest