The following is adapted from recent advice to an East European player who is being battered.

Even if you are constantly attacked, you can build a little army (big enough to be safe when raiding - beware outer defences!) and you send the troops somewhere safe, preferably where they will do some useful work.

If you are logging off for many hours, they will be safer reinforcing a big strong unassailable ally than staying with you, but a long raid would make them even safer. See below.

Whether you will be online for a while, or will be off but coming back in just a few hours, send them somewhere that brings them back at a time when you expect to be online. No matter how long you expect to be offline, work out how long, then divide by two to get the time troops should spend getting somewhere. They spend the other half getting back.

Check villages that are further away than you might usually want to raid for efficiency. A good place to start, if you are in an alliance, is the alliance attacks menu.

Test each village for the time it would take for particular troops to get to it. Write that all down somewhere, with the villages in order of distance. You will end up with a list or table something like this:

Village name Swordsman Phalanx Haeduan Druidrider Theutates Thunder
Vill1 1hr 10min 1hr 00min 0hr 32 min 0hr 27min 0hr 22min
Vill2 1hr 45min 1hr 30 min 0hr 48min 0hr 40 min 0hr 33min
Vill32hr 20min 2hr 00min 1hr 04min 0hr 54 min 0hr 44min
Vill4 4hr 40min 4hr 00min 2hr 08min 1hr 48min 1hr 28min
Vill5 11hr 05min 9hr 30min 5hr 04min 4hr 16min 3hr 29min

(Some of that you can do by calculation without having to check each one individually. Maybe this wiki can create a table something like the above that allows people to look up times just by counting the tiles in between them and the target.)

Now if you know you will be offline for 9 hours, you look at your table to find a time that suits: half of 9 means you send Swordsmen (along with anything else you like because they all travel at the speed of the slowest troops in the force) to Vill4, whence they will return just 20 minutes after you come online again.

If you think the 9 hours might actually be nearer 10, you could play safe by sending Haeduans and faster troops to Vill5 for a 10hr 08min round trip.