allenA
Convex Community3y ago
1 reply
allen

I m running into an issue with the new

I'm running into an issue with the new cron job architecture.

The function I wish to invoke from my cron job is one that I wish to be protected by an internal api key so it cant be invoked by clients, as its secret-protected.

My api key is stored in environment variables via convex secret manager. There doesnt seem to be away for me to access this data in order to populate the needed api key arg for my function as cron jobs are registered at import time, when env vars arent available.

Seems I either need a cron registration method that is executed at the appropriate runtime OR a better way to protect functions from the client.
Was this page helpful?