Skip to content

Commit

Permalink
#361 javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
syjer committed Nov 22, 2018
1 parent 030d246 commit f76b8c8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/main/java/alfio/manager/SpringScheduledJobs.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@
import java.util.Date;
import java.util.List;

/**
* <p>Scheduled jobs. Important: all the jobs should be able to run on multiple instance at the same time.</p>
* <p>Take great care in placing a select id ... for update skip locked to avoid multiple job execution for the same object</p>
*
*/
@Component
@DependsOn("migrator")
@Profile("!" + Initializer.PROFILE_DISABLE_JOBS)
Expand Down Expand Up @@ -65,7 +70,7 @@ public void cleanupUnreferencedBlobFiles() {


//run each hour
@Scheduled(cron = "0 0 0/1 1/1 * ? *")
@Scheduled(cron = "0 0 0/1 * * ?")
public void cleanupForDemoMode() {
if (environment.acceptsProfiles(Profiles.of(Initializer.PROFILE_DEMO))) {
log.trace("running job cleanupForDemoMode");
Expand All @@ -85,7 +90,7 @@ public void generateSpecialPriceCodes() {


//run each hour
@Scheduled(cron = "0 0 0/1 1/1 * ? *")
@Scheduled(cron = "0 0 0/1 * * ?")
public void sendOfflinePaymentReminderToEventOrganizers() {
log.trace("running job sendOfflinePaymentReminderToEventOrganizers");
ticketReservationManager.sendReminderForOfflinePaymentsToEventManagers();
Expand Down

0 comments on commit f76b8c8

Please sign in to comment.