citusdata / pg_cron

Run periodic jobs in PostgreSQL
PostgreSQL License
2.9k stars 195 forks source link

Log start & end time for all failed runs #324

Closed kketch closed 6 months ago

kketch commented 7 months ago

Currently start and end times are not recorded in the job_run_details table for job runs that fail to start due to connection problems, lack of available background workers when background execution is enabled, or other early-stage failures occurring before the cron task is in progress.

This change ensures that start_time & end_time are recorded for those failures. The intent is to guarantee that timestamps are always available in the log table once a job reaches a definitive state (succeeded / failed)

Fixes #246

marcoslot commented 6 months ago

Thanks!