コード例 #1
0
ファイル: OvernightMarginService.cs プロジェクト: alpo-8/MT
        private void PlanEodJob(DateTime operatingIntervalStart, DateTime operatingIntervalEnd, DateTime currentDateTime)
        {
            var eodTime = operatingIntervalStart.AddMinutes(_overnightMarginSettings.ActivationPeriodMinutes);

            if (currentDateTime < eodTime)
            {
                JobManager.AddJob(() => _tradingEngine.ProcessExpiredOrders(operatingIntervalEnd),
                                  (s) => s.NonReentrant().ToRunOnceAt(eodTime));
            }
            else
            {
                JobManager.AddJob(() => _tradingEngine.ProcessExpiredOrders(operatingIntervalEnd),
                                  (s) => s.ToRunNow());
            }
        }