if (scheduledTask.isOneTimeTask()) {
timer = timerManager.schedule(scheduledTask.getTimerListener(), scheduledTask.getDelay());
}
else {
if (scheduledTask.isFixedRate()) {
timer = timerManager.scheduleAtFixedRate(
scheduledTask.getTimerListener(), scheduledTask.getDelay(), scheduledTask.getPeriod());
}
else {
timer = timerManager.schedule(
scheduledTask.getTimerListener(), scheduledTask.getDelay(), scheduledTask.getPeriod());