Depends on the conditions but I probably wouldn't go past three weeks to a month. It always makes me nervous when the buckets start turning brown, but maybe I am just paranoid.
with a pump moving the water around it is going to last a lot longer than it just sitting there stagnent. but i still woudlnt let it sit much longer than a month or 2 tops. but i always make mine a few days before im ready to use it so never sits very long.
You should scrub down the container with bleach water (10:1 is good) twice a year. Saltwater in a sealed container is good for about 30 days. In a covered barrel with circulation, longer. You don't want any contaminants to get into the barrel that might ruin the water.