pg_cron
pg_cron copied to clipboard
pg_cron not running
I have tried several way to run pg_corn but unable to do that. Did not found any log. Somewhere it said entry on on .pgpass and hba.conf file but not sure how to entry on pg_hba.conf because I did not found any user for pg_corn. There is no log at postgresql about pg_corn unable to execute for a rease. I am not sure does it support 24hr time format or not. Is here anyone can help me out?
`postgres=# select * from cron.job; jobid | schedule | command | nodename | nodeport | database | username | active | jobname -------+-------------+---------------------------------------------------------------------------------+-----------+----------+--------------+----------+--------+--------------- 1 | 52 14 * * * | /data/pgsql/scrirpts/db_table_archiver.sh | 127.0.0.1 | 5439 | test_db | postgres | t | data_archiver 2 | 56 14 * * * | create table t1(a int); insert into t1(a) select * from generate_series(1,10); | localhost | 5439 | test_db | postgres | t | (2 rows)
postgres=# select * from cron.job_run_details; jobid | runid | job_pid | database | username | command | status | return_message | start_time | end_time -------+-------+---------+----------+----------+---------+--------+----------------+------------+---------- (0 rows)
postgres=# select now(); now
2022-09-16 14:59:51.263822+06 `
I'm having a similar problem.
Some background information: two systems ingesting a lot of data but sysOne's is a little higher htop 10 due to xml parsing while sysTwo htop 4. Postgres configurations are identical. Last weekend sometime there was a large spike of xml data and all but one of the cron jobs stop running in sysOne.
Not really experienced with postgres and would like to know how to handle this.
@amcdonaldccri,
You might be hitting the bug I filed back in Late August: https://github.com/citusdata/pg_cron/issues/200