Subversion Repositories SmartDukaan

Rev

Rev 23768 | Rev 23841 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 23768 Rev 23794
Line 9... Line 9...
9
import com.smartdukaan.cron.migrations.RunOnceTasks;
9
import com.smartdukaan.cron.migrations.RunOnceTasks;
10
import com.smartdukaan.cron.monitored.NagiosMonitorTasks;
10
import com.smartdukaan.cron.monitored.NagiosMonitorTasks;
11
 
11
 
12
@Component
12
@Component
13
public class ScheduledSkeleton {
13
public class ScheduledSkeleton {
14
	
14
 
15
	private static final Logger log = LogManager.getLogger(ScheduledSkeleton.class);
15
	private static final Logger log = LogManager.getLogger(ScheduledSkeleton.class);
16
 
16
 
17
	@Autowired
17
	@Autowired
18
	ScheduledTasks scheduledTasks;
18
	ScheduledTasks scheduledTasks;
19
 
19
 
Line 21... Line 21...
21
	NagiosMonitorTasks nagiosMonitorTasks;
21
	NagiosMonitorTasks nagiosMonitorTasks;
22
 
22
 
23
	@Autowired
23
	@Autowired
24
	RunOnceTasks runOnceTasks;
24
	RunOnceTasks runOnceTasks;
25
 
25
 
26
	/*@Scheduled(cron = "0 5 0 * * * ")
26
	/*
27
	public void generateDailyRecharge() {
27
	 * @Scheduled(cron = "0 5 0 * * * ") public void generateDailyRecharge() {
28
		scheduledTasks.generateDailyRecharge();
28
	 * scheduledTasks.generateDailyRecharge(); }
29
	}*/
29
	 */
30
 
30
 
-
 
31
	/*
31
	/*@Scheduled(cron = "0 45 0 * * *")
32
	 * @Scheduled(cron = "0 45 0 * * *") public void processScheme() throws
32
	public void processScheme() throws Exception {
-
 
33
		scheduledTasks.processScheme();
33
	 * Exception { scheduledTasks.processScheme(); }
34
	}*/
34
	 */
35
 
35
 
36
	@Scheduled(cron = "0 15 0 * * *")
36
	@Scheduled(cron = "0 15 0 * * *")
37
	public void reconcileRecharge() throws Exception {
37
	public void reconcileRecharge() throws Exception {
38
		scheduledTasks.reconcileRecharge();
38
		scheduledTasks.reconcileRecharge();
39
	}
39
	}
40
 
40
 
41
	@Scheduled(cron = "0 05 0 1,16 * ?")
41
	@Scheduled(cron = "0 05 0 1,16 * ?")
42
	public void processRechargeCashback() throws Throwable {
42
	public void processRechargeCashback() throws Throwable {
43
		scheduledTasks.processRechargeCashback();
43
		scheduledTasks.processRechargeCashback();
44
	}
44
	}
45
	
45
 
-
 
46
	/*
46
	/*Value so big so that it got to run only once.
47
	 * Value so big so that it got to run only once.
47
	 * 
48
	 * 
48
	 */
49
	 */
49
	@Scheduled(fixedDelay=1000*60*10)
50
	@Scheduled(fixedDelay = 1000 * 60 * 10)
50
	public void migrateLineItems() throws Throwable
51
	public void migrateLineItems() throws Throwable {
51
	{
-
 
52
		log.info("Started run Once");
52
		log.info("Started run Once");
53
		runOnceTasks.migarateLineItemsToNewTable();
53
		runOnceTasks.migarateLineItemsToNewTable();
54
	}
54
	}
55
	/*
55
	/*
56
	@Scheduled(fixedRate=Integer.MAX_VALUE)
56
	 * @Scheduled(fixedRate=Integer.MAX_VALUE) public void runTwice() throws
57
	public void runTwice() throws Throwable
-
 
58
	{
-
 
59
		log.info("Started run Twice");
57
	 * Throwable { log.info("Started run Twice");
60
		scheduledTasks.reconcileRecharge();
58
	 * scheduledTasks.reconcileRecharge(); }
61
	}*/
59
	 */
62
	/*@Scheduled(fixedRate=Integer.MAX_VALUE)
-
 
63
	public void runThird() throws Throwable
-
 
64
	{
60
	/*
-
 
61
	 * @Scheduled(fixedRate=Integer.MAX_VALUE) public void runThird() throws
65
		log.info("Started run Third");
62
	 * Throwable { log.info("Started run Third");
66
		scheduledTasks.processRechargeCashback();
63
	 * scheduledTasks.processRechargeCashback(); }
67
	}*/
64
	 */
68
 
65
 
-
 
66
	
69
}
67
}