If you have a battery operated timer, it is probably the Intermatic ST01C or EJ500.http://waterheatertimer.org/Programmable.html
The link above will help you identify your timer.
As a general rule, if a new battery does not revive the Intermatic timer, then timer needs to be replaced. Make sure you have electricity. And be sure to mark your wires before removing timer. Mark the black wire that connected to timer-black wire. It's the hot wire from breaker box.
You can replace with same model and brand so your wiring is EZ.
The ST01C and EJ500 are 7-day timers with up to 40 programs per week. They each connect with 2 wires. Black and Blue with red wire capped off. Just mark your wires before you disconnect old timer. And then reconnect new timer wires just as old timer was connected. The red wire is capped off.
The Aube T1032 is also a 7-day timer with 7 programs per week. This timer connects a bit differently. It connects with 3 wires. You put the black where old timer-black wire connected. And then you connect the red and blue together and connect them where the old timer-blue wire connected.
Other timers require wiring that is bit different, but the page link above shows the wiring ... and you can re-post another question any time >>> or respond to this answer.
Keep us posted.