0

I would like to run a basic query at 8am everyday, preferably using the Jetbrains Datagrip IDE.

The query is irrelevant, but here it is for illustrative purposes:

select month,count(*) as distinct_month
into table.table
from table2.table

What are the steps required to schedule this job. For what it's worth, I'm query against an AWS Redshift database. Thank you.

ZJAY
  • 1,467
  • 6
  • 22
  • 42
  • Postgres does not have a built-in scheduler. Don't know about Redshift – a_horse_with_no_name Oct 26 '16 at 13:54
  • Is there any work around? How do people who use postgres schedule recurring jobs? Do people abandon postgres all together if they cannot schedule jobs? – ZJAY Oct 26 '16 at 13:56
  • They simply use `cron` or other operating system schedulers. There are some extensions available that provide built-in schedulers but I doubt any of them would run with redshift as that is built on a really, really old version of Postgres – a_horse_with_no_name Oct 26 '16 at 14:11
  • You can also schedule this query using AWS Lambda with scheduled events: https://docs.aws.amazon.com/lambda/latest/dg/with-scheduled-events.html – Guy Oct 29 '16 at 17:49

0 Answers0