Fixes #3. Additional logic added to rescheduleRestarts.
Prevents scheduling restarts when server is offline, or if restarts have already been scheduled.