활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
Hi All,
Need AEM scheduler code in a bundle to pick osgi configuration and start execute automatically as soon as bundle is deployed.
Currently after deploying the bundle with scheduler code in it, every time have to save OSGI configuration for respective scheduler to get it start.
Any pointers across it would be really appreciated.
해결되었습니다! 솔루션으로 이동.
토픽은 커뮤니티 콘텐츠를 분류하여 관련성 있는 콘텐츠를 찾는 데 도움이 됩니다.
조회 수
답글
좋아요 수
Hi,
Can you check if you used both Activate and Modified annotations for activate mathod
Sample Code -
https://github.com/arunpatidar02/aem63app-repo/blob/master/java/SimpleScheduledTask.java
@activate
@Modified
protected void activate(final Config config) {
myParameter = config.myParameter();
}
조회 수
답글
좋아요 수
Already have set immediate = true but still no use
조회 수
답글
좋아요 수
Hi,
Can you check if you used both Activate and Modified annotations for activate mathod
Sample Code -
https://github.com/arunpatidar02/aem63app-repo/blob/master/java/SimpleScheduledTask.java
@activate
@Modified
protected void activate(final Config config) {
myParameter = config.myParameter();
}
조회 수
답글
좋아요 수
조회 수
답글
좋아요 수
Can you check following -
조회 수
답글
좋아요 수
조회 수
답글
좋아요 수
조회 수
답글
좋아요 수
This is the config class code.
package com.aem.core.services;
import org.osgi.service.metatype.annotations.AttributeDefinition;
import org.osgi.service.metatype.annotations.AttributeType;
import org.osgi.service.metatype.annotations.ObjectClassDefinition;
@ObjectClassDefinition(name = "Scheduler Configuration", description = "Configuration for mentioned in Scheduler ")
public @interface SchedulerConfigItr {
@AttributeDefinition(name = "Scheduler name", description = "Name of the scheduler", type = AttributeType.STRING)
public String schedulerName() default "Extract Asset Metadata Scheduler";
@AttributeDefinition(name = "Enabled", description = "True, if scheduler service is enabled", type = AttributeType.BOOLEAN)
boolean serviceEnabled() default true;
@AttributeDefinition(name = "Cron Expression", description = "Cron expression based on which scheduler runs", type = AttributeType.STRING)
public String cronExpression() default "0 0/1 * 1/1 * ? *";
@AttributeDefinition(name = "Folder Path", description = "Define folder path for extraction of assets metadata", type = AttributeType.STRING)
public String folderPath() default "/content/dam/abc";
}
Do let me know if anything is missing ?
조회 수
답글
좋아요 수