script to print message by date