INSERT INTO vclib.t_job (jobid, name, concurrentexecute, jobuser)
VALUES ('92E370C2-C25D-4AF7-9FB4-7749D24159B0', 'Удаление IHE_CLINICALDOCUMENT_EVENT старше 30 дней', false, NULL);

INSERT INTO vclib.t_job_schedule (scheduleid, job, mask, startdate, enddate, recurs, starttime, enabled, type, occurs, servers)
VALUES ('BF348047-29C4-4E14-B1C1-D2E46A9D0B78', '92E370C2-C25D-4AF7-9FB4-7749D24159B0', NULL, '2025-02-19 00:00:00', NULL, 1,'2007-05-07 01:00:00', TRUE, 2,0,NULL);

INSERT INTO vclib.t_scheduler_operation (operationid, name, type_, processname)
VALUES ('5E8D9387-1054-44E5-9AF3-755488DD4CDD','Удаление IHE_CLINICALDOCUMENT_EVENT старше 30 дней', (SELECT entityid FROM vclib.t_entities WHERE entname = 'RUN_PROCESS_OPERATION' LIMIT 1), 'DropExpiredIheClinicalDocumentEvent');

INSERT INTO vclib.t_job_step (jobstepid, step, continueonerror, job, operation)
VALUES ('026B102A-B03C-440E-871C-51187837AB41', 1, FALSE,'92E370C2-C25D-4AF7-9FB4-7749D24159B0', '5E8D9387-1054-44E5-9AF3-755488DD4CDD');

INSERT INTO vclib.t_process_handler_custom (customprocesshandlerid, processname, objectname, preparelexem, executelexem, postexecutelexem)
VALUES ('ED8F562E-3CAB-4204-9EB9-B9BA868A0551', 'DropExpiredIheClinicalDocumentEvent', null, 'begin(sp_params, gnp)          @gnp := new Process("StoredProcedureProcess");          @gnp->{Parameters}["ParamSPName"] := "akuz.sp_dropexpirediheclinicaldocumentevent";          @gnp->Run();  end', null, null);