I would only add them in secondary. I like to add bourbon and oak separately, so you have more control over the flavor balance.
When using cubes, you really can't let them sit too long. The minimum contact time I'd say if you want a complex oak flavor is two months. At 4-6 months it'll get really interesting and good. If the style of beer will take it, go longer if you can. A light, weak beer isn't a good candidate, but a dark strong one is.
If I want to oak something faster, I'll use chips for 7 days. It's a more one-dimensional flavor, but is nice in IPAs and the like, where you won't get the benefit from extended aging.