Instead you should create a timer in the onInit function and then publish your message in the triggered callback of the timer.