Example #1
0
        public async static Task RemoveObsoleteIdeas([TimerTrigger("0 0 * * * *")] TimerInfo timerInfo)
        {
            var operation = "Remove obsolete ideas";

            LogService.LogOperationStarted(operation);
            using (var spClientContext = await AuthenticationHelper.GetSharePointClientAppOnlyContextAsync())
            {
                var plannerService = new PlannerService(spClientContext);
                try
                {
                    await plannerService.ReoveObsoleteIdeas();
                }
                catch (Exception ex)
                {
                    LogService.LogError(ex);
                }
            }
            LogService.LogOperationEnded(operation);
        }