コード例 #1
0
        /// <summary>
        /// Get all active scrum of next hour from storage and schedule based on given start time.
        /// For ex: If current UTC time is 10.00 AM, this will fetch scrums scheduled for 11.00 AM and 11.30 AM from storage by UTC hour calculated as 11.
        /// </summary>
        /// <returns>A task that schedules scrum.</returns>
        private async Task GetAllScrumDetailAndScheduleAsync()
        {
            var scrumMasterDetails = await this.scrumMasterStorageProvider.GetActiveScrumMasterOfNextHourAsync();

            if (scrumMasterDetails != null)
            {
                foreach (var scrumMaster in scrumMasterDetails)
                {
                    CronExpression expression = CronExpressionHelper.CreateCronExpression(DateTimeOffset.Parse(scrumMaster.StartTime, CultureInfo.InvariantCulture));
                    await this.ScheduleScrumAsync(expression, scrumMaster);
                }
            }
        }