Skip to content

update aliyun-schedulerx-spring-boot-sample#72

Open
yaohuitc wants to merge 4 commits into
alibaba:masterfrom
yaohuitc:master
Open

update aliyun-schedulerx-spring-boot-sample#72
yaohuitc wants to merge 4 commits into
alibaba:masterfrom
yaohuitc:master

Conversation

@yaohuitc

Copy link
Copy Markdown

update aliyun-schedulerx-spring-boot-sample, schedulerx support job running with spring @scheduled annotation

@CLAassistant

CLAassistant commented Oct 19, 2022

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

package com.alibaba.cloud.examples.schedulerx.job.annotation;

import com.alibaba.schedulerx.common.domain.ExecuteMode;
import com.alibaba.schedulerx.worker.processor.SchedulerX;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个注解的包名建议改下

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已调整

* Can use @SchedulerX annotation set job config when open sync(true)
*/
@Scheduled(cron = "0/5 * * * * ?")
@SchedulerX(name = "simpleJobWithAnnotation", model = ExecuteMode.STANDALONE)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可否用一个注解,cron配置放在@SchedulerX

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已调整

@@ -0,0 +1,23 @@
## 控制台定义任务配置信息,或通过注解定义任务 (推荐模式)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

建议这份文件类型也修改为yml,因为另外一份文件格式是yml,保持一致会显得正式一些,否则会让用户感觉有点随意。


2. pom增加依赖aliyun-schedulerx-spring-boot-starter

2. 进入任务调度控制台->应用管理,点击"创建应用",配置应用分组信息保存(PS:本地开发测试环境仅支持公网region创建分组对接)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

region字符前有异常字符,需要删除一下。

* Can use @SchedulerX annotation set job config when open sync(true)
*/
@Scheduled(cron = "0/5 * * * * ?")
@SchedulerX(name = "simpleJobWithAnnotation", model = ExecuteMode.STANDALONE)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

该处需要跟实际代码保持一致。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants