Hi guys, I'm using a simple typscript file for running one simple cronjob. Below the code:
Hi,
Does this basically run indefinitely, waking up periodically do run the job, then go back to sleep? If that's the case, you'll need to select the "CPU always allocated" option for Cloud Run and probably set min instances=1 as well. Without this, your job will not run, because by default, Cloud Run services only run when they receive a request.
Another option is to deploy the actual job part as a Cloud Run job, and set up a Cloud Scheduler trigger to run it on schedule. This will likely work out cheaper as you'll only pay for CPU when the job is actually running. https://cloud.google.com/run/docs/execute/jobs-on-schedule