Variable time-window rebalancing

Hey everybody, new on the forum but been experimenting with Zipline and Pyfolio for a few months now.

Can someone point me towards a way to rebalance a portfolio in an alternative time-frame, such as quarterly and annually?

I am currently using the schedule_function method to rebalance daily and monthly, but I don’t see a way in the source code to do so in alternate windows without adding some source code.

If anybody has an idea, not only about this but also as to how it would be possible to create exit conditions based on timing, it would be really helpful. For exemple, such a strategy could look like: (1) Buy at the 52W high (2) Sell 15 days later. I am having trouble with the second part.

Thank you all and have a great day !