-
Notifications
You must be signed in to change notification settings - Fork 42
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
pgAgent "Job no steps to execute!" problem #25
Comments
Hello, I have a job that runs every minute. Here is my job step: [postgres] # select * from pgagent.pga_jobstep where jstjobid='1'; Here is job log: [postgres] # select * from pgagent.pga_joblog order by jlgid desc limit 20; Could this be a bug? Thanks, |
Hi @kocersema and @HalacliSeda I am not able to reproduce the issue on Windows 10, I have created a job that runs every minute and called the procedure as a part of the job step. I have tested two separate code Second: In both the above cases, the issue was not reproducible. I have raised the PR 29 which contains some Debug/Warning logs to identify the issue. |
Hi @kocersema and @HalacliSeda On which platform you are running pgAgent? |
Hi @akshay-joshi , |
Hi @HalacliSeda I have observed one more thing in your pga_joblog table. It seems that for some reason the jobs throwing an error 'No steps to execute' are scheduled at the same time or before a minute. It could be the reason pgAgent ignoring those steps. Please refer to the below screenshot: We have added the warning logs as part of the PR 29 to identify the exact issue. |
Hi @akshay-joshi , Thanks. |
Hi What I see is that there is a Job running loop at pgagent.cpp line 102 which relies on "jobnextrun <= now()" to try and run the Job. And this is why you'll get in the job log table: @akshay-joshi Do you think it would be possible to avoid those 'i' lines by NOT trying and run the Job while it is already running. Either by updating the 'jobnextrun' column at the same moment you update the 'joblastrun' column, or by checking the Job status before trying to run it again? Thanks in advance and sorry if not very clear in my explanations. |
Hello,
I use pgagent_14-4.2.1.
Jobs run every minute. Sometimes this error occurs but there are steps in pgagent.pga_jobstep.
Problem name: [2 / requestloginsert_minute] Job no steps to execute!
pgagent.pga_joblog :
In the screenshot, 3 jobs start and end at the same time.
How can I solve this problem?
Thank you.
The text was updated successfully, but these errors were encountered: