Subversion Repositories SmartDukaan

Rev

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

Rev 26944 Rev 27007
Line 8... Line 8...
8
import org.springframework.scheduling.annotation.Scheduled;
8
import org.springframework.scheduling.annotation.Scheduled;
9
import org.springframework.stereotype.Component;
9
import org.springframework.stereotype.Component;
10
 
10
 
11
import com.smartdukaan.cron.migrations.RunOnceTasks;
11
import com.smartdukaan.cron.migrations.RunOnceTasks;
12
import com.smartdukaan.cron.monitored.NagiosMonitorTasks;
12
import com.smartdukaan.cron.monitored.NagiosMonitorTasks;
-
 
13
import com.smartdukaan.cron.scheduled.leadsync.LeadSyncRunner;
13
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
14
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
14
 
15
 
15
@Component
16
@Component
16
public class ScheduledSkeleton {
17
public class ScheduledSkeleton {
17
 
18
 
18
	private static final Logger log = LogManager.getLogger(ScheduledSkeleton.class);
19
	private static final Logger log = LogManager.getLogger(ScheduledSkeleton.class);
19
 
20
 
20
	@Autowired
21
	@Autowired
21
	private ScheduledTasks scheduledTasks;
22
	private ScheduledTasks scheduledTasks;
-
 
23
	
-
 
24
	@Autowired
-
 
25
	private LeadSyncRunner leadSyncRunner;
22
 
26
 
23
	@Autowired
27
	@Autowired
24
	private Reconciliation reconciliation;
28
	private Reconciliation reconciliation;
25
 
29
 
26
	@Autowired
30
	@Autowired
Line 109... Line 113...
109
		log.info("startTime" + LocalDateTime.now());
113
		log.info("startTime" + LocalDateTime.now());
110
		scheduledTasks.checkfocusedModelInPartnerStock();
114
		scheduledTasks.checkfocusedModelInPartnerStock();
111
 
115
 
112
		log.info("endTime" + LocalDateTime.now());
116
		log.info("endTime" + LocalDateTime.now());
113
	}
117
	}
-
 
118
	
-
 
119
	@Scheduled(cron = "0 5 0 * * *")
-
 
120
	public void syncLeads() throws Throwable {
-
 
121
		log.info("startTime" + LocalDateTime.now());
-
 
122
		leadSyncRunner.syncLeads();
-
 
123
		
-
 
124
		log.info("endTime" + LocalDateTime.now());
-
 
125
	}
114
 
126
 
115
	@Scheduled(cron = "0 0 8,10,12,14,16,18,20 * * *")
127
	@Scheduled(cron = "0 0 8,10,12,14,16,18,20 * * *")
116
	public void notifyLead() throws Throwable {
128
	public void notifyLead() throws Throwable {
117
		scheduledTasks.notifyLead();
129
		scheduledTasks.notifyLead();
118
		scheduledTasks.notifyVisits();
130
		scheduledTasks.notifyVisits();