日期:2014-05-17 浏览次数:20661 次
public boolean getSendMessageRecipients()
{
Connection conn = null;
CallableStatement cs = null;
ResultSet rs = null;
boolean flag = true;
try
{
conn = DBControl.getConnection();
cs = conn.prepareCall("{call tb_sp_management_send_message(?,?,?)}");
rs=cs.executeQuery();
} catch (Exception e)
{
logger.error("", e);
} finally
{
DbUtils.closeQuietly(conn, cs, rs);
}
return flag;
}
public void functionname(){
Timer timer;
timer.schedule(new TimerTask() {
public void run() {
getSendMessageRecipients();
}
}
, 0L, SMSINTERVAL * 1000);//这里的时间自己改
}