public void reschedule(String taskName, String cronExpression, Runnable runnable) {
        CronTrigger trigger = new CronTrigger(cronExpression);
        ScheduledFuture<?> task = taskScheduler.schedule(new Task(taskName, runnable), trigger);
        ScheduledFuture<?> previousTask = scheduledTaskMap.put(taskName, task);
        if (previousTask != null) {
            previousTask.cancel(false);
        }
    }
Handle tasks in a thread

@author James Chen
turms-server-common/src/main/java/im/turms/server/common/infra/task/TaskManager.java