If the jars have been well sterilised, confit onion will keep for a long time. I recommend keeping them in the fridge because of the fat content (butter)