コード例 #1
0
        public override DBCrontabEvent Tick()
        {
            var crontabEvent = base.Tick();

            crontabEvent.LastRanTime = CrontabEntry.LastRunTime;

            CrontabEntry.LastRunTime = DateTime.Now;
            var crontabEntryRepository = new DBCrontabEntryRepository();

            crontabEntryRepository.SaveOrUpdate(CrontabEntry);

            return(crontabEvent);
        }
コード例 #2
0
        protected override void InitTick()
        {
            var crontabEntryRepository = new DBCrontabEntryRepository();

            CrontabEntry = crontabEntryRepository.LoadCrontabByKey(Key);

            if (CrontabEntry == null)
            {
                CrontabEntry = new DBCrontabEntry(Key);
                crontabEntryRepository.SaveOrUpdate(CrontabEntry);
            }

            base.InitTick();
        }