Hi,
I am running a cron job that’s a Deno script. I set it up using the advice from this thread:
I chose Node as the runtime environment.
For the build command I have:
curl -fsSL https://deno.land/install.sh | sh
For the command I have:
export PATH="$DENO_INSTALL/bin:$PATH" && deno task start
In Environment I have DENO_INSTALL
set to /opt/render/project/.deno
I also have a few other Environment Variables that my script needs.
When I “Trigger Run” manually, the script works. It looks like this:
Nov 6 04:23:16 PM ==> Running 'export PATH="$DENO_INSTALL/bin:$PATH" && deno task start'
Nov 6 04:23:16 PM Task start deno run --allow-read --allow-env --allow-net main.ts
... the script works
However, when the cron job runs automatically my script runs but it fails because it does not have access to the environment variables.
Is there some reason the environment variables would be available when I do “Trigger Run” but would not be available when cron runs the script automatically?
Thanks!