When I have wait for slow commands (operations on large databases for example), I start doing something else and often don't notice for a long time that it has finished, wasting valuable time. I am looking for a way for the shell to alert me (by which I mean, run some custom command which I can determine) when a command which has been running for more than X seconds has finished and I got back the prompt.
I am using Bash, but solutions for other shells would be interesting as well.