Skip to content

修改Map任务

Map任务可修改参数

参数名参数类型参数值参数规则备注
jobIdLong任务ID
jobNameString任务名称
argsStrString执行任务参数封装了对应新增的方法,通过k,v的形式新增
executorInfoString执行器名称
triggerTypeInteger触发类型2. 固定时间 3.CRON 表达式 99.工作流
triggerIntervalString间隔时长
blockStrategyInteger阻塞策略1、丢弃 2、覆盖 3、并行
executorTimeoutInteger任务执行超时时间单位:秒
maxRetryTimesInteger最大重试次数
retryIntervalInteger重试间隔单位:秒
parallelNumInteger并行数
descriptionString描述

Map任务修改demo

java
/**
* 修改Map任务
*/
public Boolean updateMapJob(Long jobId) {
    return SnailJobOpenApi.updateMapJob(jobId)
            .addArgsStr("update测试数据", new Random().nextInt(1000))
            .setParallelNum(3)
            .execute();
}