JAL-3599 Cater for macOS. ScheduledExecutor timeout implemented