Class ScheduledJobs

java.lang.Object
edu.ucsb.cs156.happiercows.jobs.ScheduledJobs

@Component("scheduledJobs") public class ScheduledJobs extends Object
This class contains methods that are scheduled to run at certain times to launch particular jobs. The value of the cron parameter to the @Scheduled annotation is a Spring Boot cron expression, which is similar to a Unix cron expression, but with an extra field at the beginning for the seconds.
See Also:
  • Constructor Details

    • ScheduledJobs

      public ScheduledJobs()
  • Method Details

    • runUpdateCowHealthJobBasedOnCron

      @Scheduled(cron="${app.updateCowHealth.cron}", zone="${app.timezone}") public void runUpdateCowHealthJobBasedOnCron()
    • runMilkTheCowsJobBasedOnCron

      @Scheduled(cron="${app.milkTheCows.cron}", zone="${app.timezone}") public void runMilkTheCowsJobBasedOnCron()