@Component
public class FlightTrainTask {
@Scheduled(cron = "0/5 * * * * ? ") // 间隔5秒执行
public void taskCycle() {
System.out.println("使用SpringMVC框架配置定时任务");
}
}
这种定时发送是写死的。
我想实现jsp传递时间日期,后台根据这个时间来进行定时发送。
有没有这种思路或者demo参考一下。谢谢
@Component
public class FlightTrainTask {
@Scheduled(cron = "0/5 * * * * ? ") // 间隔5秒执行
public void taskCycle() {
System.out.println("使用SpringMVC框架配置定时任务");
}
}
这种定时发送是写死的。
我想实现jsp传递时间日期,后台根据这个时间来进行定时发送。
有没有这种思路或者demo参考一下。谢谢
将时间存到数据库表中 , 建立一个定时任务去查询这个表 , 有满足条件的记录就执行具体业务