I really wish people would stop using vague phrases like “doesn’t work”. They convey almost zero useful information. Much more productive is describing in concrete detail:
- what you tried
- what it did
- what you wanted instead
- how those two things are different
In any event, what I would do in this situation is to pick an arbitrary number of notifications to preset based on how frequently people are expected to be using the app. Let’s say four for the sake of discussion, which would be a month’s worth.
So at every app launch, I would ask getPending()
what’s in the pipeline, and if there are fewer than four in there, I would use date-fns to walk out X more weeks one at a time, filling out until we’re up to four, and calling schedule()
to book each one.