i need to run one script inside of other, and there is some terms
- main script in scheduled in cron for everyday runing every 5min
- i need to run /tmp/script2.sh after first 3 days in month
- i need to run /tmp/script2.sh from 7-9AM, main script is runining all day
all recommendations are welcome, specially if you have better solution then my
#! /bin/sh
TODAY=`date +%e`
HOUR=`date +%l`
/tmp/script1.sh
if [ $TODAY != 1 ] && [ $TODAY != 2 ] && [ $TODAY != 3 ];
then
if [ $HOUR = 7 ] && [ $HOUR = 8 ] && [ $HOUR = 9 ];
/tmp/script2.sh
fi
fi