private static String generateCrontabExpression(String scheduleUnit, Integer scheduleInterval) {
        if (scheduleUnit.isEmpty()) {
            LOGGER.error("Schedule unit and interval must not be null for generating crontab expression");
            throw new DolphinScheduleException(
                    "Schedule unit and interval must not be null for generating crontab expression");
        }
        String crontabExpression;

        switch (Objects.requireNonNull(ScheduleUnit.getScheduleUnit(scheduleUnit))) {
            case SECOND:
                crontabExpression = String.format("0/%d * * * * ? *", scheduleInterval);
                break;
            case MINUTE:
                crontabExpression = String.format("* 0/%d * * * ? *", scheduleInterval);
                break;
            case HOUR:
                crontabExpression = String.format("* * 0/%d * * ? *", scheduleInterval);
                break;
            case DAY:
                crontabExpression = String.format("* * * 1/%d * ? *", scheduleInterval);
                break;
            case WEEK:
                crontabExpression = String.format("* * * 1/%d * ? *", scheduleInterval * 7);
                break;
            case MONTH:
                crontabExpression = String.format("* * * * 0/%d ? *", scheduleInterval);
                break;
            case YEAR:
                crontabExpression = String.format("* * * * * ? 0/%d", scheduleInterval);
                break;
            default:
                LOGGER.error("Unsupported schedule unit for generating crontab: {}", scheduleUnit);
                throw new DolphinScheduleException("Unsupported schedule unit for generating crontab: " + scheduleUnit);
        }

        return crontabExpression;
    }
Calculate the offset according to schedule info

@param scheduleInfo The schedule info
@return timestamp between two schedule task
inlong-manager/manager-schedule/src/main/java/org/apache/inlong/manager/schedule/dolphinscheduler/DolphinScheduleUtils.java