launchd does not work when sleeping, it will only be run on next wake. Can you clarify on how you're ssh'ing into the machine, the machine would drop network connectivity unless you're using wake-over-lan or equivalent.
Note that it's possible that darkwake/powernap gives you some opportunities to run things at a periodic interval, although off the top of my head I don't believe there's any api to actually schedule when this happens. (I also don't know if this is something that's even schedulable or whether it just decides to wake once an hour. Reading the xnu source would tell you but I'm too lazy to do that.)
Another option is scheduling a `pmset wake` but it's not clear if this works when lid closed.