If you can, then go for 40 days jamat, and then spend 3 days in khanqah. And next time go for 40 day khanqah (if the sheikh allows) and then go for 3 days Jamat. But if you can have a say in it, make a 40 day jamat and visit khanqahi masajid!