Q:

Keep the user amused with long running task (WEB)

What are the best ways to keep the user busy/amused when he's waiting for a long running task to complete?  
Thoughts:

Show random tips or help messages
Progressbar (but if it's a long running task this isn't very handy because it doesn't change very frequently)

Or does anyone have some examples of how other people solve this problem in their web application? 

A:

Don't you think he'd rather minimize your window and do some other work?  Or go and get a coffee?  Or chat with his buddies? 
Why don't you just let him know it'll take some time and let him decide? 
It seems all you'll be doing is making more work for yourself and the user's precious CPU :-). 

A:

I'd concentrate on calculating how long the task is going to take as accurately as possible, then let the user know, so they can decide what to do while it's running. 

A:

Inform the user:
Give an estimate of the duration
Show progress (perhaps if your user is a techie show him/her what is actually being done)
Notify the user:
Make sure the user knows that they will be notified once the task is complete or if it requires their attention (for errors, et.).  This will allow them comfortably do other things whilst knowing that the process is progressing.  
Background processing:
Where possible try to make the process non-intrusive.  That is, try to have it run in the background whilst the user continues with his/her use of your site, and once it completes it just notifies them (through an AJAX pop-up or notification of some sort).  This is best done if the process is account related not session related.  This way, if the user puts in the request to start the process and the connection is lost (browser closed, etc.)  the process completes and is ready when the user returns.  If the process is session related, this will be tough since it will be terminated with the session.  
Useful messages:
If you just have to keep the user waiting, try using the time to display useful messages (either tips, or advertisements, etc.)