My general rule of thumb is that if I have had more than 2 weeks of use, I will change them at the next opportunity I get.. even if they are not broken. However, I can't alway afford new strings every 2 weeks, and sometimes I can't get to a store to buy them that often either.. So it usually ends up about once a month or so.
So.. if you break a single string within 2 weeks of stringing your guitar change the single string.. anything more than a month, change the whole set.Use your judgement for anything in between..