I wrote a a python script to check the tmperature via API call and then change the color of my Philips Hue Lights regarding temperature and rain. The only problem I'm facing is that the whole thing runs - as a cronjob - on my MacBook Air(10.10.4) which is normally asleep at 6am.
Crontab and launchd is not a solution, because those don't wake the Mac. I tried a scheduled wake up with Energy Savers's schedule but due to the mac is closed it immediately falls asleep again. I thought about using caffeinated with a cronjob that runs a minute before the actual script to keep the MacBook alive(after the schedule from the energy saver kicks in) but no success.
There is a third party solution which also didn't work for me: power manager
The only thing that should work is to "prevent computer from sleeping automatically when the display is off" in the energy saver preferences. The computer is most of the time on the charger so this would work. Although there is a slight chance that I forget to not close the lid before going to sleep at night ;-)
so any solutions which do not include buying a mac mini for automatic tasks like this :-)
br.kg