0
votes

My web site is running on my Google Compute Engine. I have another instance, in which no of Cron jobs are configured to pull some reports from the web page everyday on different schedules. I thought that, if i move these cron jobs to "Google Cron Jobs service" i can save some amount on billing. When i check the google articles, no where i found we can schedule cron job for Compute engine. I would like to know whether its possible to create cron jobs for compute engine or its limited to app engine only. Thank you.

1
"Google Cron Jobs service" is this mean cloud scheduler?slideshowp2
We have "Cron Job" as a service is GCloud, but its limited to app engine.Mani

1 Answers

0
votes

For what you describe, I would recommend you to create a Cloud Function to start and stop the Compute Engine instance with Cloud Scheduler as described here.

This would help you save a bit of money since your instance wouldn't be running at all times and also you wouldn't have to do any big changes in your current solution as the cron would still run inside the Compute Engine instance and then the instance would stop.

The only big thing to take into consideration is the time that the cron takes to run since you have to give it enough time to finish the job before the Cloud Function stops the instance.

Hope you find this useful!