package com.yunfeiyun.agmp.common.framework.scheduling;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class ScheduledService {

    @Autowired
    CronTaskRegistrar cronTaskRegistrar;

    public void addCronTask(String cronExpress){
        SchedulingRunnable task = new SchedulingRunnable("springRevenueProcessor", "process", null);
        cronTaskRegistrar.addCronTask(task, cronExpress);
    }

}
