When is an action dismissed for failure to prosecute?

There are three situations contemplated in the term "failure to prosecute." They are discussed in Rule 17, Section 3 of the Rules of Court. Any of these cases may be used as a ground to dismiss the complaint and the general rule is that such dismissal is with prejudice.

[1] If the plaintiff fails to appear at the time of trial; 
[2] If he fails to prosecute his action for an unreasonable length of time; and
[3] If he fails to comply with the Rules of Court or any order of the court.