public async Task <IActionResult> CreateMonthlyBackgroundTask([FromBody] CreateBackgroundTaskModel model, [FromRoute] int atDay = 0, [FromRoute] int atHour = 0, [FromRoute] int atMinute = 0, [FromRoute] int atSecond = 0) { model.Expression = CronTemplates.Monthly(atDay, atHour, atMinute, atSecond); return(await CreateBackgroundTask(model)); }
public void Monthly_on_first_of_month() { var cron = CronTemplates.Monthly(); var schedule = CronTemplates.Parse(cron); var diff = CompareTwoCronOccurrences(schedule); Assert.True(diff.Days == 30 || diff.Days == 31); }
public void Monthly_on_first_of_month() { string cron = CronTemplates.Monthly(); CrontabSchedule schedule = CrontabSchedule.Parse(cron); TimeSpan diff = CompareTwoCronOccurences(schedule); Assert.True(diff.Days == 30 || diff.Days == 31); }