首页 > 其他分享 >xxljob的使用

xxljob的使用

时间:2022-12-26 10:00:37浏览次数:37  
标签:创建 lasReminderTriggerConfig 任务 job 使用 JobInfo xxljob

创建定时任务

//创建任务
        JobInfo job = new JobInfo();
        //设置任务属性
        job.setJobDesc(lasReminderTriggerConfig.getJobRemark());//
        job.setAuthor(AuthenticationHelper.getCurrentUser());
        job.setAlarmEmail("");
        job.setScheduleType("CRON");
        job.setScheduleConf(lasReminderTriggerConfig.getCronExpression());//
        job.setExecutorHandler("defaultReminderJob");//
        job.setExecutorParam(entity.getId());//设置任务参数
        job.setChildJobId("");
        job.setMisfireStrategy("DO_NOTHING");
        job.setExecutorRouteStrategy("ROUND");
        job.setExecutorBlockStrategy("SERIAL_EXECUTION");
        job.setExecutorTimeout(0);
        job.setExecutorFailRetryCount(0);
        job.setGlueType("BEAN");
        String jobInfo = timeTaskService.add(job);

 

标签:创建,lasReminderTriggerConfig,任务,job,使用,JobInfo,xxljob
From: https://www.cnblogs.com/dangwang/p/17005063.html

相关文章