Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google App Engine cron job not showing up

I created a Google Cloud function that gets data and dumps it into a Google SQL Database. I need this function to execute every 15 minutes. As I understand it you cannot execute cloud functions in a cron job. The workaround is to deploy an app in the App engine.

I've deployed a simple NodeJS application that makes an http request using the NodeJS https module. I've deployed this app to Google App Engine along with the following cron.yaml

cron:
- description: "Gets new data every 15 minutes"
  url: /
  schedule: every 15 mins

But this is not executing and it is not showing up in the cron jobs list. Does the above cron job syntax look correct?

Is there anything else I need to do to get Google App Engine to pick up this cron job?

tyia

like image 639
user316114 Avatar asked Nov 12 '18 01:11

user316114


People also ask

What is cron job in Google App Engine?

The App Engine Cron Service allows you to configure regularly scheduled tasks that operate at defined times or regular intervals. These tasks are commonly known as cron jobs.


1 Answers

I had mistakingly thought that cron.yaml would be deployed as a cron job when I executed gcloud app deploy

To deploy the cron job I had to explicitly deploy cron.yaml

gcloud app deploy cron.yaml
like image 80
user316114 Avatar answered Oct 04 '22 09:10

user316114