I guess if you could make a custom pwm profile for 29.5 days you could just start it when you want and it would ramp up and down and repeat at the end of the 29.5 days. This would be the basic lunar cycle.Would it be sufficient to have the sine set where it increments forward by about an hour each day? That would give it close to a monthly cycle (realistically could get closer to true cycle if needed).
Additionally be able to set min/max and where in the cycle to start that day (only needed to "sync" to current moon phase.)