ENV variables for scheduled functions

How can I use ENV variables for scheduled functions? I specified a variable in [context.production.environment], my “normal” lambda can see it properly, but not the scheduled one. Not sure if I’m doing something wrong or it should be configured in a different way for scheduled functions

Hi @qweasd :wave:t6: hiya, thanks so much for reaching out!. Can you share your function log? To debug can you try manually executing the scheduled function to see if the environment variable is accessible during runtime?

I forgot that env variables are not available for the functions in Netlify. So for my previous function I made a simple script to inject them during the build, while for scheduled one I forgot to do this and just assumed that it should work from the box, which is not the case :slight_smile:

thanks for coming back and sharing this with the community.