Let me give you some advice, which will cause you to be on the path of goodness always- Establish Prayer.
He then appointed Muadh ibn Jabal as his successor and ordered him to lead people in prayers; after the prayers Muadh went to him and, at that moment, his soul departed.