public void Execute(IJobExecutionContext context) { try { LoadConnections objLoadConn = new LoadConnections(); objLoadConn.cacheConnections(); if (Settings._Main.createMD) { if (T1.Cron.getTriggerStatus(Settings._Main.triggerId, Settings._Main.groupId) == TriggerState.Normal) { T1.Cron.pauseTrigger(Settings._Main.triggerId, Settings._Main.groupId); //SuSo.B1.Base.MetaData.Instance objInstance = new B1.Base.MetaData.Instance(); //objInstance.CreateMD(); Settings._Main.createMD = false; Settings._Main.Write(); T1.Cron.continueTrigger(Settings._Main.triggerId, Settings._Main.groupId); } } } catch (Exception er) { _Logger.Fatal("", er); } finally { if (T1.Cron.getTriggerStatus(Settings._Main.triggerId, Settings._Main.groupId) != TriggerState.Normal) { T1.Cron.continueTrigger(Settings._Main.triggerId, Settings._Main.groupId); } } }
static public void loadCron() { if (_cron == null) { _cron = new Cron(); } try { LoadConnections objLoadConn = new LoadConnections(); objLoadConn.cacheConnections(); LoadStartUpJob(); } catch (Exception er) { _Logger.Fatal("", er); } }