Пример #1
0
        public ForkedJobExecutor(IJobRunContextFactory jobRunContextFactory, IJobRunInformationService jobRunInformationService, IJobRunProgressChannel progressChannel, IPeriodicTimer periodicTimer, IDateTimeProvider dateTimeProvider, ForkedExecutionConfiguration configuration)
        {
            this.jobRunContextFactory     = jobRunContextFactory;
            this.jobRunInformationService = jobRunInformationService;
            this.configuration            = configuration;
            this.progressChannel          = progressChannel;
            this.periodicTimer            = periodicTimer;
            this.dateTimeProvider         = dateTimeProvider;

            this.periodicTimer.Setup(this.StartReadyJobsFromQueue, StartNewJobsEverySeconds);
        }
Пример #2
0
        public DefaultScheduler(IJobbrRepository repository, IJobExecutor executor, InstantJobRunPlaner instantJobRunPlaner, ScheduledJobRunPlaner scheduledJobRunPlaner, RecurringJobRunPlaner recurringJobRunPlaner, DefaultSchedulerConfiguration configuration, IPeriodicTimer periodicTimer, IDateTimeProvider dateTimeProvider)
        {
            this.repository = repository;
            this.executor   = executor;

            this.instantJobRunPlaner   = instantJobRunPlaner;
            this.scheduledJobRunPlaner = scheduledJobRunPlaner;
            this.recurringJobRunPlaner = recurringJobRunPlaner;

            this.configuration    = configuration;
            this.periodicTimer    = periodicTimer;
            this.dateTimeProvider = dateTimeProvider;

            this.periodicTimer.Setup(this.EvaluateRecurringTriggers);
        }