citusdata / citusdata/pg_cron

pg_cron not doing scheduled jobs (insert query)

Open
#112 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
3.9k
Forks
260
Avg merge
5d 5h
Merged PRs (30d)
1

Description

Hi,

I've successfully installed and added pg_cron 12 on my PostgreSQL 12. Scheduling jobs also were successful, it reflects on 'cron.job' table. The jobs were some insert queries which fetch data from one table and insert them to another, in the same database.

**Example**:
database=#SELECT cron.schedule('* * * * *', $$INSERT INTO table2 (colname) SELECT COUNT(*) FROM table2$$);
Also tried with,
database=#SELECT cron.schedule('* * * * *', $$INSERT INTO table2 (colname) SELECT COUNT(*) FROM table2;$$);

But the scheduled jobs were **not done**.
Also, when I try to **unschedule** the jobs using specific jobid, it shows an **error**.

**ERROR**: could not find valid entry for job 10

Kindly, guide me how to overcome this problem. If there is any bug, please fix it as soon as possible.

Thank You.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the INSERT job through cron.schedule and inspect its row in cron.job, then reproduce the reported unschedule error for the job ID. Done means the scheduled INSERT executes reliably and the job can be removed without the “could not find valid entry” error.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.