Hi,

CustomJob is a nested class  annotated with @Scheduled inside in class
annotated with @ApplicationScoped and @Named


@Named("appBean")
@ApplicationScoped
public class ApplicationBean implements Serializable {


@Scheduled(cronExpression = "0/5 * * * * ?")
    public class CustomJob implements Job {

        public CustomJob() {}

        @Override
        public void execute(JobExecutionContext context) throws
JobExecutionException {
            System.out.println(System.currentTimeMillis());
        }
    }

Reply via email to