I am using the following test to establish at what time of day a command has run.
time=`date '+%H'`
if [ $time = "13" ]
then
at 01:00 tomorrow < leads.ksh
fi
if [ $time = "01" ]
then
at 13:00 today < leads.ksh
fi
There is a little problem in that some of the other processing can cause the scripts to run at times other than at 1300 and 0100 hours.
What I'm after is how to test that the $time variable is running in the morning 0100-1100 and evening 1200-2300.
I felt that using the hour part of date would be best though there maybe a better way?
Any help would be appreciated
cheers
simmo
time=`date '+%H'`
if [ $time = "13" ]
then
at 01:00 tomorrow < leads.ksh
fi
if [ $time = "01" ]
then
at 13:00 today < leads.ksh
fi
There is a little problem in that some of the other processing can cause the scripts to run at times other than at 1300 and 0100 hours.
What I'm after is how to test that the $time variable is running in the morning 0100-1100 and evening 1200-2300.
I felt that using the hour part of date would be best though there maybe a better way?
Any help would be appreciated
cheers
simmo