#!/bin/bash
while :
do
        echo "Press [CTRL+C] to stop.."
     d=`date`
     status=`apachectl status | grep Status`
     echo "$d $status" >> apache_status.txt
     sleep 1
done

To run this:

# nohup ./apache.sh &