Find why the runtime scheduler never recognizes this job.
Java
import java.lang.annotation.*;
@Retention(RetentionPolicy.CLASS)
@Target(ElementType.METHOD)
@interface Scheduled {}
class CleanupJob {
@Scheduled
public void run() {}
}
public class Main {
public static void main(String[] args) throws Exception {
var method = CleanupJob.class.getDeclaredMethod("run");
System.out.println(method.isAnnotationPresent(Scheduled.class));
}
}