Commit 7f57afbf by huangfusuper

增加Cron表达式的解析工具类

parent 4f3255ea
package com.byit.job; package com.byit.job;
import cn.hutool.cron.pattern.CronPattern;
import com.byit.job.model.JavaBeanJobInfo; import com.byit.job.model.JavaBeanJobInfo;
import com.byit.job.utils.CronExpression;
import com.byit.launcher.JobRunServerLauncher; import com.byit.launcher.JobRunServerLauncher;
import com.byit.rpc.remoting.invoker.route.LoadBalance; import com.byit.rpc.remoting.invoker.route.LoadBalance;
import com.byit.utils.JobUtils; import com.byit.utils.JobUtils;
import java.io.IOException; import java.io.IOException;
import java.text.ParseException;
import java.util.Date;
import java.util.concurrent.TimeUnit;
/** /**
* @program: byit-myth-job->Mains * @program: byit-myth-job->Mains
...@@ -15,7 +20,7 @@ import java.io.IOException; ...@@ -15,7 +20,7 @@ import java.io.IOException;
**/ **/
public class Mains { public class Mains {
public static void main(String[] args) throws IOException { public static void main(String[] args) throws IOException {
String plServerUrl = "http://10.0.55.237:8888,http://10.0.55.232:8888"; String plServerUrl = "http://10.0.55.237:8888";
String mythCron = "时间"; String mythCron = "时间";
String routingStrategy = LoadBalance.ROUND.name(); String routingStrategy = LoadBalance.ROUND.name();
String blockingStrategy = "阻塞策略"; String blockingStrategy = "阻塞策略";
...@@ -29,4 +34,5 @@ public class Mains { ...@@ -29,4 +34,5 @@ public class Mains {
JobUtils.addJob(javaBeanJobInfo); JobUtils.addJob(javaBeanJobInfo);
new JobRunServerLauncher(8888); new JobRunServerLauncher(8888);
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment