You need two different signals, one to turn the motor CW, and the other to turn the motor CCW. These signals would be used to drive an H-Bridge which reverses the current through the motor.
I would use a 555 astable (oscillator) running at a period of 5 minutes. Use the 555 to advance a CMOS 4017 counter which counts 0-9 with decoded outputs. Use count 1 as CW, and count 3 as CCW. This gives you a cadence of 5min of CW, 5min of stop, 5min of CCW, and then 35min of stop. Both the 555 and the 4017 will run off 12Vdc.