/** 预置后台定时计划，自动清理BOTP日志 **/

IF NOT EXISTS (SELECT 1 FROM T_SCH_TASKDEFINE WHERE FID = '1ZA+MR+D0O/A') 
INSERT INTO T_SCH_TASKDEFINE(FID,FCLASSNAME,FAPPID,FNUMBER) VALUES ('1ZA+MR+D0O/A','kd.bos.form.plugin.botp.BotpLogClearTask','botp','BotpLogClearTask');  

IF NOT EXISTS (SELECT 1 FROM T_SCH_TASKDEFINE_L WHERE FPKID = '1ZA+DGADTJPW') 
INSERT INTO T_SCH_TASKDEFINE_L(FID,FPKID,FLOCALEID,FNAME) VALUES ('1ZA+MR+D0O/A','1ZA+DGADTJPW','zh_CN','自动清理反写日志'); 



IF NOT EXISTS (SELECT 1 FROM T_SCH_JOB WHERE FID = '1ZA+DD0R9H7R') 
INSERT INTO T_SCH_JOB(FID,FTASKCLASSNAME,FTASKDEFINEID,FRUNBYUSERID,FJOBTYPE,FSTATUS,FPARAMS,FNUMBER) VALUES ('1ZA+DD0R9H7R','kd.bos.form.plugin.botp.BotpLogClearTask','1ZA+MR+D0O/A',1,'BIZ','1','{"normallogkeepdays":"10","errlogkeepdays":"60"}','botp_LogClearTask'); 

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 ('1ZA+DD0R9H7R','1ZA+DGADTJPV','zh_CN','自动清理反写日志'); 



IF NOT EXISTS (SELECT 1 FROM T_SCH_SCHEDULE WHERE FID = '1ZA+TGD1MLY8')
INSERT INTO T_SCH_SCHEDULE(FTWENTY,FFIVE,FELEVEN,FNINE,FNO,FSUN,FTWO,FEIGHT,FNOV,FPLAN,FWED,FHOST,FTWENTYTWO,FFOUR,FMAR,FSEP,FENDTIME,FSIX,FREPEATMODE,FMAY,FTHIRTYONE,FBYDAYORWEEK,FTWENTYSEVEN,FTWENTYSIX,FTHIRTEEN,FAUG,FDESC,FFIFTEEN,FTWENTYONE,FBYWEEK,FTUES,FSEVENTEEN,FSEVEN,FTWENTYFOUR,FMON,FTHIRTY,FTHREE,FFOURTEEN,FJAN,FNINETEEN,FTHUR,FTEN,FFRI,FJOBID,FSTARTTIME,FOCT,FAPR,FSIXTEEN,FID,FSAT,FONE,FTWENTYEIGHT,FTWENTYTHREE,FTWELVE,FNOWEEK,FSTATUS,FNUMBER,FTWENTYFIVE,FEIGHTEEN,FCYCLENUM,FTWENTYNINE,FJUL,FDEC,FJUN,FFEB) VALUES ('0','0','0','0',' ','0','0','0','0','0 0 0 * * ?','0','172.19.114.67','0','0','0','0',{ts'2099-12-30  10:30:21'},'0','d','0','0','d','0','0','0','0','事件将于每1天重复','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','1ZA+DD0R9H7R',{ts'2021-10-11  00:00:00'},'0','0','0','1ZA+TGD1MLY8','0','0','0','0','0',' ','1','BotpLogClearTask','0','0',1,'0','0','0','0','0'); 

IF NOT EXISTS (SELECT 1 FROM T_SCH_SCHEDULE_L WHERE FPKID = '1ZA+DGADTJPU')
INSERT INTO T_SCH_SCHEDULE_l(FID,FPKID,FLOCALEID,FNAME) VALUES ('1ZA+TGD1MLY8','1ZA+DGADTJPU','zh_CN','自动清理反写日志'); 

/**  **/


