So this system is a vast modular monitoring system. The odd thing is that many of the other modules work totally fine. I added some logging to this particular module. Its so odd. The query being executed returns 0 results when run through sql agent. Only for this module.
Eh, I gave up. I scheduled it using windows scheduler and its working fine.