Trying to use the "custom events" option with a custom function

Trying to use the "custom events" option with a custom function

Hello,

I'm trying to create a custom function in Zoho Subscription that is supposed to send out an email 30 days before a subscription is set to expire.  I've created the custom function and set it up to use a "custom event" of 30 days before the "Next Invoice Date" but I never seems to execute on this custom event.  I've tested the custom function by using the "Execute" button and it is working fine in the matter.

Is there a trick to get this to work or is there a better way I can accomplish what I'm trying to do?

Thanks,
Jeff