Yes, you can do this. But we might need more help to get you to your solution.
First off, what do you mean by “even numbered days”?
- the 2nd, 4th, 6th … 28th and 30th (except February) of every month?
- by Julian day: January 2nd, 4th … 30th, then February 1st (Julian day 32), etc?
- … or something else completely?
Raspbian includes
cron, Unix's powerful but spectacularly confusing tool to execute scheduled commands. So if your Raspberry Pi's clock is set correctly, you can get cron to schedule things for you.
Secondly, by dawn to dusk, do you want:
- exactly the local astronomical times of sunrise and sunset?
- when a sensor tells you the sun has gone up or gone down?
Both are doable. The second one doesn't need much of a computer, but will need lots of trial and error selecting, placing and calibrating a light sensor. Quite importantly, this light sensor will need to be protected from the light you turn on at sunset — unless you like a continuously flashing light. Ask me how I know ☺
For local sunrise and sunset times, you need to know your latitude and longitude. From this, you can work out when the sun rises and sets, and the various civil definitions (dawn, twilight, dusk, etc) that arise from them. I use
sunwait to handle all that difficult stuff. All it does is wait until the event you want, then exits. Doesn't sound like much, but if you trigger it very early in the morning (with cron), you can have it wait for dawn — and then the command specified after it on the cron command line will run.
I already use this setup to control a couple of lights around the house using X10. This is expensive and fiddly, but you don't need the hardware part.
A couple of links. Not particularly beginner-friendly, but none of them impossible to learn and understand how they work:
cheers,
Stewart