Subversion Repositories SmartDukaan

Rev

Rev 23866 | Rev 24121 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
23756 amit.gupta 1
package com.smartdukaan.cron.scheduled;
2
 
3
import org.apache.logging.log4j.LogManager;
4
import org.apache.logging.log4j.Logger;
5
import org.springframework.beans.factory.annotation.Autowired;
6
import org.springframework.scheduling.annotation.Scheduled;
7
import org.springframework.stereotype.Component;
8
 
9
import com.smartdukaan.cron.monitored.NagiosMonitorTasks;
10
 
11
@Component
12
public class ScheduledSkeleton {
23794 govind 13
 
23756 amit.gupta 14
	private static final Logger log = LogManager.getLogger(ScheduledSkeleton.class);
15
 
16
	@Autowired
17
	ScheduledTasks scheduledTasks;
18
 
19
	@Autowired
20
	NagiosMonitorTasks nagiosMonitorTasks;
21
 
23761 amit.gupta 22
	@Scheduled(cron = "0 15 0 * * *")
23756 amit.gupta 23
	public void reconcileRecharge() throws Exception {
24
		scheduledTasks.reconcileRecharge();
25
	}
26
 
23759 amit.gupta 27
	@Scheduled(cron = "0 05 0 1,16 * ?")
23756 amit.gupta 28
	public void processRechargeCashback() throws Throwable {
29
		scheduledTasks.processRechargeCashback();
30
	}
23794 govind 31
 
32
	/*
33
	 * Value so big so that it got to run only once.
23756 amit.gupta 34
	 * 
35
	 */
23929 amit.gupta 36
 
37
	@Scheduled(cron = "0 0 9 * * *")
23794 govind 38
	public void migrateLineItems() throws Throwable {
23756 amit.gupta 39
		log.info("Started run Once");
23929 amit.gupta 40
		scheduledTasks.sendPartnerInvestmentDetails();
23756 amit.gupta 41
	}
42
}