Does Cloud SQL Postgres have any cron-like tool?

倾然丶 夕夏残阳落幕 提交于 2020-01-15 03:29:27

问题


I would like to use Cloud SQL with PostgreSQL with an internal cron-like tool. In the extensions list I can't find anything like that.

Do you know any solution/alternative which wouldn't include having an extra Compute Engine instance from where we can make calls ?


回答1:


You can't run cron internally in Cloud SQL as it is fully managed and you only get the access to the database itself.

Workaround

If you need to run this inserts and selects each minute then you can use Google's Task queues to send a request to an App Engine service that will do all that.

cron:
    - description: "make some select/insert"
      url: /tasks/populate
      schedule: every 1 mins
      target: populate_postgres

You have 28 free instance hours a day to use with App Engine instances.



来源:https://stackoverflow.com/questions/51609087/does-cloud-sql-postgres-have-any-cron-like-tool

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!