-
Notifications
You must be signed in to change notification settings - Fork 67
Description
Before going into the bug, I want to thank you for this great product pg_timetable. I am pretty happy with it even though of the following bug.
Describe the bug
I’ve been running pg_timetable in production for precisely two months now. Today (2025-04-17), I received an alert because a PostgreSQL procedure didn’t launch as expected.
After investigating, I found that none of my 8 chains - which are scheduled to run every 15 minutes - executed at 12:45. What’s odd is that pg_timetable process itself was running as expected but didn’t detect any chains to run, which I can see from the pg_timetable.log file:
time="2025-04-17T12:45:00-04:00" level=info msg="Retrieve scheduled chains to run" count=0
And the execution_log table show no trace of running anything:

To Reproduce
I can't say I am able to reproduce this behavior since it happened only one time in two months but here is the script I used to create one of the chain:
DO LANGUAGE plpgsql $$
DECLARE
v_chain_id bigint;
BEGIN
INSERT INTO timetable.chain (chain_id, chain_name, run_at, live)
VALUES (DEFAULT, 'Job de maintenance Gestion des horaires', '*/15 * * * *', true)
RETURNING chain_id INTO v_chain_id;
INSERT INTO timetable.task (chain_id, task_order, task_name, command, database_connection, autonomous)
VALUES (v_chain_id, 1, 'Tâche de maintenance pour GDH', 'CALL horaire_garde.maintenance_horaire_garde()',
format('dbname=secretdb user=secretuser password=secretpassword'), TRUE);
END;
$$;
All 8 chains follow a similar structure.
Expected behavior
Chain execute at each 15 minutes
Additional context
OS: Windows Server 2019
Timetable version: 5.11
Postgresql version: 14.15
The timetable process run on the same server as Postgresql cluster.