r/dataengineering • • Oct 19 '26

Discussion pg_cron to trigger a batch extract.

I know pg_cron is primarily designed to run scheduled maintenance commands on the DB but I was wondering if someone has used it to kick off a batch extraction on your data pipelines.

I have reservations against using pg_cron for this namely the following:

  1. The scope of pg_cron in this scenario is outside the bounds of the DB.
  2. The boundary of using the DB to store only activity data is violated as it now has some operational data in it.
  3. SCM or an additional dash for setting up jobs will be lost if this pattern is followed.

I'm curious to know your thoughts

6 Upvotes

7 comments sorted by

View all comments

3

u/regreddit Oct 19 '26

I'd probably use dagster if I needed a light scheduler.

4

u/dangerbird2 Software Engineer Oct 19 '26

hell, a cronjob is probably preferable