Garrison duty and land blockades were the most common operations. When armies were campaigning, surprise attacks, ambushes and stratagems were common. More formal battles were usually preceded by the two armies camping one to seven miles (2–12 km) apart for days or weeks; sometimes forming up in battle order each day. If either commander felt at a disadvantage, they might might march off without engaging. In such circumstances it was difficult to force a battle if the other commander was unwilling to fight. Forming up in battle order was a complicated and premeditated affair, which took several hours. Infantry were usually positioned in the centre of the battle line, with light infantry skirmishers to their front and cavalry on each flank. Many battles were decided when one side's infantry force was attacked in the flank or rear and they were partially or wholly enveloped.