Several ways to go.
Buy a timer/switch that'll do the job.
Build or buy a timer, and use relays to direct forward and reverse on the motor, or
other ideas that come to mind.
You'll get more responses on this site, if you're more specific in what you're doing.
AC or DC motor, speed, what...