I'm setting up a 3.5 gallon today that I plan to start a fish in cycle as soon as the fish is added. (I'll do 2 50% water changes per week) But how long should the tank be set up and running with the filter before the fish is added?

do you have a test kit? you need to do more then 2 weekly water changes when cycling fish in, I would test the water everyday and change when levels get dangerous, ammonia can spike up pretty fast esp in a smaller tank

I also suggest a test kit.. then you can do a water change whenever your ammonia starts to rise.. that could mean you're going PWC daily or you may be able to get by with just twice a week - but you can't know without testing.

For bettas you can get away with just testing ammonia. Other fish are more sensitive but bettas can happily tolerate a wider variety of parameters. I only use the other tests on my planted tanks or when I suspect there's a problem.

Ammonia is really the one to watch, but until your cycle completes I'd also check nitrites daily (nitrites are harmful like ammonia, so if they get too high that also requires a PWC), and nitrates every other day... after your tank cycles, continue to test ammonia daily for a week or so and if it is staying at 0, you can just check it before weekly water changes along with nitrites and nitrates. Testing nitrates can also give you an indication of how much water to change - you'd need to change more if they start to increase too much.