To do that, we'd need an "agent" process, which we don't have. But, fortunately, there are some good applications out there that act as exactly this kind of agent.
I recommend a very nice program called
Peripheral Vision, from Granted Software. It's really useful, and notifies you whenever peripherals are attached and detached.
You can perform "actions" when these events occur, one of which can be running an AppleScript. So, just set up the scheduled backup as described in the User's Guide, except don't do the Cron part. Instead, set up an event in Peripheral Vision that runs the little script application.
Bingo! You've got backup-on-attach!