Scheduler wrapper in Java