Scheduler not working in AEM 6.3
Hello,
I have following code for scheduler, I am just trying to print the log statement to check if scheduler actually works. It is not firing any event. In the logs I see -
[java.lang.Runnable]] ServiceEvent REGISTERED
But nothing gets printed. Can you please help ? Here is the code I am using -
@Component(immediate = true )
@Properties({
@Property(
label = "Cron expression defining when this Scheduled Service will run",
description = "[every minute = 0 * * * * ?] ",
name = "scheduler.expression",
value = "0 1 0 ? * *"
),
@Property(
label = "Allow concurrent executions",
description = "Allow concurrent executions of this Scheduled Service. This is almost always false.",
name = "scheduler.concurrent",
propertyPrivate = true,
boolValue = false
)
})
@Service
public class RssfeedScheduler implements Runnable {
protected final Logger log = LoggerFactory.getLogger(this.getClass());
public void run() {
log.error("RSSfeed*** This is test to check if cron job is working********");
log.info("in info scheduler***");
}
@Activate
public void activate() throws RepositoryException {
log.error("In scheduler ****");
log.info("In scheduler123 ****");
}
}