Lets just say your script1.sh is creating result1.txt file.
Meanwhile, you are moving that file to another path (it might not be allowed). Then without killing the script or generating a new one, you have to make a change in your script1.sh so that it would start from step1 if the file is not found.
It will be easier for me to explain if you show me your script!
#! /bin/ksh
PATH=/usr/bin:/bin:/usr/sbin:/sbin
endtime=$(date +%H":"%M) ## assumes endtime is exactly 24 hours after starttime
processfile(){
curtime=$(date +%H":"%M)
if [ "$curtime" != "$endtime" ] ## checks that current time is not same as endtime
then
some_command & ## put your actual command block here
mpid=$(ps -ef | grep "some_command" | awk '{print $2}')
sleep 3600 ## wait an hour
else
kill -9 $mpid > /dev/null ## kill background process id
mv /dir/file /dir1/file.$(date +%Y%m%d)
sleep 60 # <-- adjust to make sure starttime is not equal to endtime
processfile ## call back function to restart processing over again
fi
}
processfile ## start function to generate and move file
exit 0