calvinmclean/automated-garden

Implement “day of week” schedule and other similar schedules

Closed this issue · 0 comments

This would allow you to choose “every Sunday and Wednesday” instead of time-based constant interval.

Depends on #22 for more complex data structure for schedules

I could also do something like "every month"

Since cron already supports both of these cases, is easily compatible with gocron library, and is well-known and somewhat easy to use (at least it is with all of the helpful resources available). I was originally going to make this a special case for parsing the pkg.Duration string, but this won't make sense in the cases where it is used as an actual Duration instead of a interval, so I might extend the struct to have a similar Interval struct.