public void updateSchedulerTimeStamp(String currentTime)
{
String methodName = "updateSchedulerTimeStamp";
// logger.setMethodStartLog(sClassName, s1);
String s2 = "Enterprise User Target Recon";
try
{
HashMap hashmap = new HashMap();
hashmap.put("Task Scheduler.Name", s2);
tcSchedulerOperationsIntf tcSchOper = (tcSchedulerOperationsIntf) getUtility("Thor.API.Operations.tcSchedulerOperationsIntf");
tcResultSet tcresultset = tcSchOper.findScheduleTasks(hashmap);
if(tcresultset != null && tcresultset.getRowCount() > 0)
{
logger.debug(className, methodName, "UPDATE TIME STAMP---->Result set has values");
tcresultset.goToRow(0);
long l = tcresultset.getLongValue("Task Scheduler.Key");
logger.debug(className, methodName, "UPDATE TIME STAMP---->Result set has values");
String s3 = String.valueOf(l);
//Task Scheduler.Task Attributes.Key logger.debug(className, methodName, "UPDATE TIME STAMP----->Task Scheduler key"+s3);
hashmap.clear();
hashmap.put("Task Scheduler.Key", s3);
hashmap.put("Task Scheduler.Task Attributes.Name", "LastRunDate");
logger.debug(className, methodName, "UPDATE TIME STAMP-----> HashMap is "+hashmap);
tcResultSet tcresultset1 = tcSchOper.findScheduleTaskAttributes(hashmap);
if(tcresultset1 != null && tcresultset1.getRowCount()>0){
tcresultset1.goToRow(0);
long l1 = tcresultset1.getLongValue("Task Scheduler.Task Attributes.Key");
logger.debug(className, methodName, "UPDATE TIME STAMP----->Task Scheduler Attribute key "+l1);
hashmap.put("Task Scheduler.Task Attributes.Value", currentTime);
logger.debug(className, methodName, "UPDATE TIME STAMP----->Current Time is "+currentTime);
tcSchOper.updateScheduleTaskAttribute(l, l1, hashmap);
}
else{
logger.debug(className, methodName, "UPDATE TIME STAMP----->Could not find any values for the scheduler attributes");
}
}
}
catch(tcAPIException tcapiexception)
{
logger.error(className, methodName, tcapiexception.getMessage());
logger.setStackTrace(tcapiexception, className, methodName, tcapiexception.getMessage());
}
catch(tcColumnNotFoundException tccolumnnotfoundexception)
{
logger.error(className, methodName, tccolumnnotfoundexception.getMessage());
logger.setStackTrace(tccolumnnotfoundexception, className, methodName, tccolumnnotfoundexception.getMessage());
}
catch(tcScheduledTaskNotFoundException tcscheduledtasknotfoundexception)
{
logger.error(className, methodName, tcscheduledtasknotfoundexception.getMessage());
logger.setStackTrace(tcscheduledtasknotfoundexception, className, methodName, tcscheduledtasknotfoundexception.getMessage());
}
catch(tcNoSuchTaskAttributeException tcnosuchtaskattributeexception)
{
logger.error(className, methodName, tcnosuchtaskattributeexception.getMessage());
logger.setStackTrace(tcnosuchtaskattributeexception, className, methodName, tcnosuchtaskattributeexception.getMessage());
}
logger.setMethodFinishLog(className, methodName);
}