Browse Source

注释定时任务

master
bgy 6 months ago
parent
commit
b785ed09d1
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      src/main/java/com/topsail/influxdb/schdule/ScheduledMessageProducer.java

+ 3
- 3
src/main/java/com/topsail/influxdb/schdule/ScheduledMessageProducer.java View File

@ -7,14 +7,14 @@ import org.springframework.stereotype.Component;
import java.time.LocalDateTime;
@Component
//@Component
public class ScheduledMessageProducer {
@Autowired
private AmqpService amqpService;
// 使用cron表达式每分钟的第10秒执行
@Scheduled(cron = "40 * * * * ?")
// @Scheduled(cron = "40 * * * * ?")
public void pushCronMessage3() {
try {
String message="{\"deviceType\":1,\"hardwareVersions\":\"1.24.1.1\",\"iMSI\":\"460087939303126\",\"iccid\":\"898604F9262380193126\",\"imei\":\"865074051888625\",\"softwareVersions\":\"1.1.6.8\"}";
@ -24,7 +24,7 @@ public class ScheduledMessageProducer {
System.out.println("设备基础信息:Cron定时消息: 失败" +e.getMessage());
}
}
@Scheduled(cron = "40 * * * * ?")
// @Scheduled(cron = "40 * * * * ?")
public void pushCronMessage2() {
try {
String message="{\"alarmType\":\"0\",\"batteryLevel\":100,\"dataBody\":\"{\\\"CSQ\\\":31,\\\"IMEI\\\":\\\"865074051888625\\\",\\\"alarm\\\":0,\\\"alarms_dat\\\":\\\"\\\",\\\"bat_level\\\":100,\\\"dev_model\\\":12,\\\"dev_type\\\":1,\\\"samp_time\\\":\\\"2000/1/1 1:1:7\\\",\\\"sensor_dat\\\":\\\"℃,MPa|null,0.0000\\\"}\",\"dataGroupNum\":2,\"devModel\":12,\"deviceType\":1,\"deviceid\":\"15208214865074051888625\",\"imei\":\"865074051888625\",\"passNum\":1,\"platformType\":\"AEP\",\"protocol\":\"mqtt\",\"sampTime\":\"2000/1/1 1:1:7\",\"sampleData\":\"0,0.0000\",\"sendTime\":\"20251229163715\",\"singalStrength\":31,\"sourcetype\":\"new_top\",\"time\":\"2025-12-29 16:37:15\",\"unit\":\"℃,MPa\",\"userName\":\"topsail\"}";


Loading…
Cancel
Save