parent
fbd4fa3931
commit
ec13813c6d
@ -0,0 +1,27 @@ |
|||||||
|
package com.hfkj.schedule; |
||||||
|
|
||||||
|
import com.hfkj.channel.gas.newlink.NewLinkGasService; |
||||||
|
import org.springframework.scheduling.annotation.Scheduled; |
||||||
|
import org.springframework.stereotype.Component; |
||||||
|
|
||||||
|
import javax.annotation.Resource; |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* @className: GasSchedule |
||||||
|
* @author: HuRui |
||||||
|
* @date: 2024/7/15 |
||||||
|
**/ |
||||||
|
@Component |
||||||
|
public class GasSchedule { |
||||||
|
@Resource |
||||||
|
private NewLinkGasService newLinkGasService; |
||||||
|
@Scheduled(cron = "5 0 0 * * ?") // 每日凌晨00:00:5执行一次
|
||||||
|
public void GasSchedule() { |
||||||
|
try { |
||||||
|
newLinkGasService.refresh(); |
||||||
|
} catch (Exception e) { |
||||||
|
System.out.println("能链【团油】油站获取失败!!!"); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue