You can achieve what you want using states and timers.
Use an instance variable on your boss, called state.
If state = fighting and BossHP > 500 -> Do all your actions and change the state of your boss instance variable to waiting, also start a timer, this timer is the time that your boss are going to stay idle...
On Timer -> set your boss.state back to fighting
So it will loop till BossHP are less or equal to 500 with some time between actions