You can use something like cron, windows task scheduler (if you're running
windows), pgagent (or jpgagent), pg_cron, or any of the others.
I personally use (and wrote) jpgagent, at the time pgagent was the only
alternative and it was very unstable for me. Here is the link if
interested: https://github.com/GoSimpleLLC/jpgAgent