I think that they last a year, but that is not the point i want to make.
This year two women here in greece died because of a single jar of green beans they had prepared had botulism. Here is an article https://www.in.gr/2022/03/29/greece/kiato-46xroni-katelikse-apo-allantiasi-pou-tis-prokalesan-fasolakia-diasolinomeni-mitera-tis/ so be careful