public string GetCronExpression(IntervalType intervalType, int value) { switch (intervalType) { case IntervalType.Minutely: return(Cron.MinuteInterval(value)); case IntervalType.Hourly: return(Cron.HourInterval(value)); case IntervalType.Daily: return(Cron.DayInterval(value)); case IntervalType.Monthly: return(Cron.MonthInterval(value)); } throw new Exception("please select a valid interval type"); }
public void NotifyUnmergeablePullRequests(PerformContext context) { var gitHubService = new GitHubService(); RecurringJob.AddOrUpdate(() => gitHubService.NotifyUnmergeablePullRequests(context), Cron.MonthInterval(12)); }
public void GetAllGitHubLabels(PerformContext context) { var gitHubService = new GitHubService(); RecurringJob.AddOrUpdate(() => gitHubService.DownloadAllLabels(context), Cron.MonthInterval(12)); }
public void AddCommentToStateHQDiscussionIssues(PerformContext context) { var gitHubService = new GitHubService(); RecurringJob.AddOrUpdate(() => gitHubService.AddCommentToStateHQDiscussionIssues(context), Cron.MonthInterval(12)); }
public void AddCommentToAwaitingFeedbackIssues(PerformContext context) { var gitHubService = new GitHubService(); RecurringJob.AddOrUpdate(() => gitHubService.AddCommentToAwaitingFeedbackIssues(context), Cron.MonthInterval(12)); }
public static void StartJobs() { // Add job schedule based on Cron expression RecurringJob.AddOrUpdate(() => new GenerateBatch().Generate(), Cron.MonthInterval(3)); }