public static long calculateOffset(ScheduleInfo scheduleInfo) {
        if (scheduleInfo == null) {
            LOGGER.error("ScheduleInfo cannot be null");
            throw new DolphinScheduleException("ScheduleInfo cannot be null");
        }

        long offset = 0;

        // Determine offset based on schedule type
        if (scheduleInfo.getScheduleType() == null) {
            LOGGER.error("Schedule type cannot be null");
            throw new DolphinScheduleException("Schedule type cannot be null");
        }

        switch (scheduleInfo.getScheduleType()) {
            case 0: // Normal scheduling
                offset = calculateNormalOffset(scheduleInfo);
                break;
            case 1: // Crontab scheduling
                offset = calculateCronOffset(scheduleInfo);
                break;
            default:
                LOGGER.error("Invalid schedule type");
                throw new DolphinScheduleException(
                        UNSUPPORTED_SCHEDULE_TYPE, "Invalid schedule type");
        }

        // Add delay time if specified
        if (scheduleInfo.getDelayTime() != null) {
            offset += scheduleInfo.getDelayTime() * MILLIS_IN_SECOND;
        }

        return offset;
    }
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