Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failure due to bad nodename does not have start_time/end_time #246

Closed
bsislow opened this issue Feb 23, 2023 · 0 comments · Fixed by #324
Closed

failure due to bad nodename does not have start_time/end_time #246

bsislow opened this issue Feb 23, 2023 · 0 comments · Fixed by #324
Labels

Comments

@bsislow
Copy link

bsislow commented Feb 23, 2023

when a job such as this runs, and nodename is bad (for example, it can also happen with database or username i believe), cron.job_run_details does not record a start or end time:

SELECT cron.schedule('this will fail', '* * * * *', 'call doesnotexist()');

result:

postgres=# select * from cron.job_run_details ;
-[ RECORD 1 ]--+----------------------------------------------------------------------------------------------------------
jobid          | 1
runid          | 1
job_pid        |
database       | postgres
username       | postgres
command        | call doesnotexist()
status         | failed
return_message | connection failed
start_time     |
end_time       |

shouldn't a start_time and end_time be recorded anyway?

we're developing in-house monitoring that runs, say, every hour... and want to check any records in job_run_details that fit the window of the last hour based on now(). we cannot do this with null date records...

thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants