Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

yaohuitc
Copy link

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

@CLAassistant
Copy link

CLAassistant commented Oct 19, 2022

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
Contributor

Choose a reason for hiding this comment

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

这个注解的包名建议改下

Copy link
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
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
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
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
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
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