Scheduling in Spring with Quartz

@Component
public class SampleJob implements Job {
 
    @Autowired
    private SampleJobService jobService;
 
    public void execute(JobExecutionContext context) throws JobExecutionException {
        jobService.executeSampleJob();
    }
}

References
http://www.baeldung.com/spring-quartz-schedule