I am using spring scheduler for executing some task in my application , it is working fine in my local system after building and uploading war file to the server it is not working.
I am using cron expression for executing task at perticular time.
Here is my code... Wheather i missed something??????
@Repository
@EnableScheduling
public class ReportScheduler {
_____________
@Scheduled(cron="0 23 11 ? * *", zone="Asia/Kolkata")
public void methodC() throws MasterNotRunningException, ZooKeeperConnectionException, ServiceException, IOException {
try{
___________________
________________
}
catch(Exception)
{
e.printstacktrace();
}
_____________
}
I want to execute this task everyday morning 1.1AM.
If i test by changing system time in local system it is working fine. After uploading war file it is not working.