/** 预置后台定时计划，自动清理超过时限的缓存数据 **/

IF NOT EXISTS (SELECT 1 FROM T_SCH_TASKDEFINE WHERE FID = '2COSF=G8P2SC') 
INSERT INTO T_SCH_TASKDEFINE(FID,FCLASSNAME,FAPPID,FNUMBER) VALUES ('2COSF=G8P2SC','kd.bos.autotask.ClearDbCacheTask','bos','clearDbCache');  

IF NOT EXISTS (SELECT 1 FROM T_SCH_TASKDEFINE_L WHERE FPKID = '2COSF=G8R47M') 
INSERT INTO T_SCH_TASKDEFINE_L(FID,FPKID,FLOCALEID,FNAME) VALUES ('2COSF=G8P2SC','2COSF=G8R47M','zh_CN','清理超过时效的Db模式缓存数据'); 



IF NOT EXISTS (SELECT 1 FROM T_SCH_JOB WHERE FID = '2COSJO1UAREB') 
INSERT INTO T_SCH_JOB(FID,FTASKCLASSNAME,FTASKDEFINEID,FRUNBYUSERID,FJOBTYPE,FSTATUS,FPARAMS,FNUMBER) VALUES ('2COSJO1UAREB','kd.bos.autotask.ClearDbCacheTask','2COSF=G8P2SC',1,'BIZ','1','{}','bos_clearDbCache_SKDJ_S'); 

IF NOT EXISTS (SELECT 1 FROM T_SCH_JOB_L WHERE FPKID = '1ZA+DGADTJPV') 
INSERT INTO T_SCH_JOB_L(FID,FPKID,FLOCALEID,FNAME) VALUES ('2COSJO1UAREB','2COSJO1UCSVL','zh_CN','清理超过时效的Db模式缓存数据'); 



IF NOT EXISTS (SELECT 1 FROM T_SCH_SCHEDULE WHERE FID = '2COSRHCZW2EH')
INSERT INTO T_SCH_SCHEDULE(FID,FJOBID,FSTARTTIME,FENDTIME,FPLAN,FNUMBER,FSTATUS,FCYCLENUM,FBYDAYORWEEK,FREPEATMODE,FDESC) VALUES ('2COSRHCZW2EH','2COSJO1UAREB',{ts'2022-04-01  00:00:00'},{ts'2099-12-30  10:30:21'},'0 0/10 * * * ?','bos_clearDbCache_SKDP_S','1',10,'d','mi','事件将于2022-04-13 14:48:19起，每10分钟重复。'); 

IF NOT EXISTS (SELECT 1 FROM T_SCH_SCHEDULE_L WHERE FPKID = '2COSRHCZU1+8')
INSERT INTO T_SCH_SCHEDULE_l(FID,FPKID,FLOCALEID,FNAME) VALUES ('2COSRHCZW2EH','2COSRHCZU1+8','zh_CN','清理超过时效的Db模式缓存数据'); 

/**  **/


