Photon loses connectivity very often, only reconnects on hard reset

I’m using Mac Terminal/latest OSX. Also tried with sudo. Same problem. My Photon will go several days without failure. I check a Spark.function() from crontab hourly. My program is also operating a relay as scheduled via Time.hour(). I was planning on installing the system at a farm hoop house this Friday, but I can’t with it being unreliable. When my Photon stops working it isn’t just the wifi. My program quits too. Pulling/inserting the power usb restarts the program. I could use a Raspberry Pi to check on it and use another relay to cycle the power but that’s obscene.