regarding saving files outside the build scope:
doing some additional reading in the forum, this does not seem to be a valid solution because serverless function architecture was meant to load and unload after use (or after 15 minutes of not being called again ). after the function is unloaded any files saved would be destroyed and not be there when the function/ environment is loaded again.
this post seem to have the solution I am looking for: Functions: node-cron fetch from external api and write results to file - #4 by gregcarv