说明:
任务可以让系统在特定日期特定时间执行指定的任务内容,并通过终止条件结束任务。
/*方法1:定时清理符合SQL清除条件的数据*/
var sql = "delete from tlk_qs_user_enterprice_info where istmp=0 and ";
sql += " item_username in(select tlk_qs_user_enterprice_info.item_username ";
sql += " from tlk_qs_user_enterprice_info where istmp=0 and not exists(";
sql += "select t_qe.item_username from t_user,";
sql += " tlk_qs_user_enterprice_info t_qe where t_user.id=t_qe.item_username))";
var process = new Packages.cn.myapps.runtime.dynaform.dts.datasource.ejb.DataSourceProcessBean();
process.remove("del",sql,getApplication());
/*方法2:定时清理符合SQL清除条件的数据*/
//2.4版本及之后可使用
var sql = "delete from tlk_qs_user_enterprice_info where istmp=0 and ";
sql += " item_username in(select tlk_qs_user_enterprice_info.item_username ";
sql += " from tlk_qs_user_enterprice_info where istmp=0 and not exists(";
sql += "select t_qe.item_username from t_user,";
sql += " tlk_qs_user_enterprice_info t_qe where t_user.id=t_qe.item_username))";
deleteByDSName("del",sql); |