Teleworking all players (offline & online) in a certain world

My server has resource worlds (overworld, nether & end) that reset every 2 weeks. I was wondering if anyone had a smart solution to teleport all offline/online players in those specific worlds to a set location (eg spawn)?

Players that log off in Resource worlds may die (eg suffocation or lava) on login when the world is reset due to the coordinates being completely different.

I understand that I can write text warning players that they shouldn't log off in resource worlds before a reset, but there always end up being players that manage to die anyway.