I've been hit with this problem before and had never found an explanation why some scripts worked and some didn't.
I eventually just added it to the crontab of a user and that was that, but I'm so glad to finally know WHY.
This is such an arcane restriction and its really hard to debug since there are no errors anywhere.