If the vehicle can move safely, get fully out of the travel lane and as far from moving traffic as the location permits. Turn on the hazard warning lights. Call 911 when the vehicle is exposed to traffic or anyone is in immediate danger; otherwise call the vehicle's roadside-assistance provider or another qualified service.
NHTSA's Move Over guidance explains that approaching drivers must move over or slow down for stopped emergency vehicles with flashing lights, and many jurisdictions extend protection to disabled vehicles. That law does not make the shoulder a safe workshop.
Do not stand beside moving traffic to place a warning device, change a tire or connect cables. Conditions, road design and local responder instructions vary. If you cannot reach the battery or jump points without entering a traffic-exposed area, stay clear and wait for trained help.