package com.quartz;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
@Service
public class TestJob {
@Scheduled(cron = "0/2 * * * * *")
public void process() {
System.out.println("job run");
}
public static void main(String[] args) throws InterruptedException {
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
"applicationContext.xml");
while (true) {
System.out.println("main running...");
Thread.sleep(10000);
}
}
}
最近下载更多
最代码-宋家辉 LV61
2023年1月29日
baihongdoudou LV5
2020年8月20日
coolmayi LV2
2020年6月8日
flygrass LV12
2019年12月20日
qiheideguang LV18
2019年6月13日
he88318799 LV16
2019年6月5日
txp1997 LV2
2019年3月29日
kk268137 LV9
2019年3月6日
ai_003 LV2
2018年8月23日
17608417105 LV9
2018年8月23日
最近浏览更多
百里守寡 LV5
6月17日
1134116035
2024年2月21日
暂无贡献等级
Dominick LV14
2023年6月19日
我们都是小怪兽 LV3
2023年2月17日
最代码-宋家辉 LV61
2023年1月29日
1358849392 LV21
2022年11月23日
微信网友_6221949417279488
2022年11月16日
暂无贡献等级
1529860026 LV24
2022年10月13日
cz8857216 LV4
2022年5月9日
pxqtsht LV16
2022年3月18日

