As @JohnW2 has already pointed out. If the supply from the wall switch that you are proposing to wire the timer into, is controlled via a dedicated 'off peak' supply, then the power supply to it will be lost during the day, so the timer won't have any power and will stop. Some timers do have battery back up, but they are designed to for use during a brief power cut, not daily use.