Both work. Each DTV entry gives up to 180 days. Inside Thailand you can apply once per entry to extend for up to another 180 days at your local immigration office. Immigration decides, and it's at their discretion, so go 2-3 weeks before your stamp expires. Bring your passport, TM.7 form, photo, fee, and current proof for your DTV category. For a work DTV that means an up-to-date employer letter/contract, plus recent bank statements showing the 500k baht. The other route is a border run or short trip out and back for a fresh 180 days, since the visa is multiple-entry for 5 years. If you'd rather not travel, the extension is the easier option. Official DTV page:
*****************************************