That is why I took one of those cheap IR remotes and upgraded it using small ATtiny85 microcontroller. Its task is to simulate button presses depending on the settings of the DIP switch. The element in use consists of five switches. The first one (1) is used for selecting the operation mode. When switched ON continuous mode is selected and long exposure mode when it is turned OFF. Other four switches (5-2) determine the length of exposure or interval. You can change the settings during exposition, but they are not taken into account until the next exposition.

Long exposure options – DIP switch 1 is set to OFF:
- DIP switch 2 ⇒ 10 min
- DIP switch 3 ⇒ 5 min
- DIP switch 4 ⇒ 2 min
- DIP switch 5 ⇒ 1 min
Total maximum time for a long exposure, when all switches are turned ON, is 18 minutes.
Continuous shooting (intervalometer) mode options – DIP switch 1 is set to ON:
- DIP switch 2 ⇒ 120 s
- DIP switch 3 ⇒ 60 s
- DIP switch 4 ⇒ 30 s
- DIP switch 5 ⇒ 10 s
Total maximum interval between two exposures in continuous shooting mode, when all switches are turned ON, is 240 seconds.

Button presses are simulated using MOS N-FET 2N7000 transistor (see the bottom image for wiring diagram). When pin 1 goes to HIGH the transistor opens and concludes an electric circuit that provides power to IR remote circuit.

The similar thing can be build without the whole IR remote circuit using only IR LED diode and microcontroller as output wave generator.