/*
|
package com.moral.api.task;
|
|
import com.moral.api.utils.WcharTest;
|
import lombok.extern.slf4j.Slf4j;
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
import org.springframework.scheduling.annotation.Scheduled;
|
import org.springframework.stereotype.Component;
|
|
import java.awt.*;
|
import java.util.Date;
|
|
*/
|
/**
|
* @ClassName jobTask
|
* @Description TODO
|
* @Author @cjl
|
* @Date 2023-12-07 15:08
|
* @Version 1.0
|
*//*
|
|
@Component
|
@EnableScheduling
|
@Slf4j
|
public class jobTask {
|
@Scheduled(cron = "0/20 * * * * ?")
|
public void startTask(){
|
String friendNickName = "文件传输助手";// "文件传输助手";
|
String msg="系统正在定时播报,每二十秒播报一次";
|
try {
|
WcharTest.sendMsgforSp(friendNickName,msg);
|
} catch (Exception e) {
|
log.error("error result ",e);
|
throw new RuntimeException(e);
|
}
|
System.out.println("每隔20秒执行一次:" + new Date());
|
}
|
}
|
*/
|