Example of how to use scheduler in real-time.