Re: Scheduled job problem
Hi, is it possible that your job run time is longer than the 5 minutes scheduling interval and it is not configured against parallel execution? If yes, consider using the semaphore settings for your service (see [1]). Best regards, Michael Brohl ecomify GmbH - www.ecomify.de [1] https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=7045171#ServiceEngineGuide-serviceDefinition Am 11.04.22 um 21:27 schrieb Tomek: Hi, I have created a job: I would like to run partialUpdateOfferJob service every 5 minutes. In the beginning every thing is ok but after some time the service is running two (or even more) times at similar time. Here is a part of my data stored in job_sandbox table: job_id job_name run_time status_id parent_job_id 269925 Partial update offer 2022-04-11 17:12:44.883000 SERVICE_QUEUED partial-update-offer 269924 Partial update offer 2022-04-11 17:12:44.686000 SERVICE_QUEUED partial-update-offer 269923 Partial update offer 2022-04-11 17:12:44.526000 SERVICE_QUEUED partial-update-offer 269897 Partial update offer 2022-04-11 16:12:52.199000 SERVICE_FINISHED partial-update-offer 269896 Partial update offer 2022-04-11 16:12:52.049000 SERVICE_FINISHED partial-update-offer 269895 Partial update offer 2022-04-11 16:12:51.80 SERVICE_FINISHED partial-update-offer 269880 Partial update offer 2022-04-11 15:33:06.26 SERVICE_FINISHED partial-update-offer 269879 Partial update offer 2022-04-11 15:32:55.404000 SERVICE_FINISHED partial-update-offer 269878 Partial update offer 2022-04-11 15:32:55.201000 SERVICE_FINISHED partial-update-offer 269851 Partial update offer 2022-04-11 14:53:05.134000 SERVICE_FINISHED partial-update-offer How can i repair it? BTW: why the service is running at irregular time period?
Re: Scheduled job problem
Thank you for your response. I think it is possible that the service run time is longer than the 5 minutes. So, I try to use the semaphore settings. I hope that solve my problem :) Tomek On 11.04.2022 22:33, Michael Brohl wrote: Hi, is it possible that your job run time is longer than the 5 minutes scheduling interval and it is not configured against parallel execution? If yes, consider using the semaphore settings for your service (see [1]). Best regards, Michael Brohl ecomify GmbH - www.ecomify.de [1] https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=7045171#ServiceEngineGuide-serviceDefinition Am 11.04.22 um 21:27 schrieb Tomek: Hi, I have created a job: I would like to run partialUpdateOfferJob service every 5 minutes. In the beginning every thing is ok but after some time the service is running two (or even more) times at similar time. Here is a part of my data stored in job_sandbox table: job_id job_name run_time status_id parent_job_id 269925 Partial update offer 2022-04-11 17:12:44.883000 SERVICE_QUEUED partial-update-offer 269924 Partial update offer 2022-04-11 17:12:44.686000 SERVICE_QUEUED partial-update-offer 269923 Partial update offer 2022-04-11 17:12:44.526000 SERVICE_QUEUED partial-update-offer 269897 Partial update offer 2022-04-11 16:12:52.199000 SERVICE_FINISHED partial-update-offer 269896 Partial update offer 2022-04-11 16:12:52.049000 SERVICE_FINISHED partial-update-offer 269895 Partial update offer 2022-04-11 16:12:51.80 SERVICE_FINISHED partial-update-offer 269880 Partial update offer 2022-04-11 15:33:06.26 SERVICE_FINISHED partial-update-offer 269879 Partial update offer 2022-04-11 15:32:55.404000 SERVICE_FINISHED partial-update-offer 269878 Partial update offer 2022-04-11 15:32:55.201000 SERVICE_FINISHED partial-update-offer 269851 Partial update offer 2022-04-11 14:53:05.134000 SERVICE_FINISHED partial-update-offer How can i repair it? BTW: why the service is running at irregular time period?
Re: Scheduled job problem
I don't think that would cause this problem, the next occurrence of a job is scheduled when the current job is queued (or started, I can't remember exactly) so generally the runTime values should be roughly 5 minutes apart regardless of how long the job takes to run. Some time is lost between creating a job and it being polled/queued so the interval between jobs will always be slightly more than 5 minutes. More common reasons for duplicate jobs can be: 1. The job is being loaded via entity XML more than once 2. A bug in the job manager code could allow duplicates to occur in some situations (usually if shutting down the instance while the job is being queued, due to incorrect transaction management). Regards Scott On Mon, 11 Apr 2022 at 21:33, Michael Brohl wrote: > Hi, > > is it possible that your job run time is longer than the 5 minutes > scheduling interval and it is not configured against parallel execution? > > If yes, consider using the semaphore settings for your service (see [1]). > > Best regards, > > Michael Brohl > > ecomify GmbH - www.ecomify.de > > > [1] > > https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=7045171#ServiceEngineGuide-serviceDefinition > > > > Am 11.04.22 um 21:27 schrieb Tomek: > > Hi, > > > > I have created a job: > > > > > tempExprTypeId="FREQUENCY" > > description="Every 5 minutes" > > integer1="12" > > integer2="5"/> > > > > > jobName="Partial update offer" > > runTime="2021-12-15 14:36:00.00" > > serviceName="partialUpdateOfferJob" > > poolId="pool" > > runAsUser="system" > > tempExprId="partial-update-offer" > > maxRecurrenceCount="-1"/> > > > > I would like to run partialUpdateOfferJob service every 5 minutes. In > > the beginning every thing is ok but after some time the service is > > running two (or even more) times at similar time. Here is a part of my > > data stored in job_sandbox table: > > > > job_idjob_namerun_time status_id parent_job_id > > 269925Partial update offer2022-04-11 17:12:44.883000 > > SERVICE_QUEUED partial-update-offer > > 269924Partial update offer2022-04-11 17:12:44.686000 > > SERVICE_QUEUED partial-update-offer > > 269923Partial update offer2022-04-11 17:12:44.526000 > > SERVICE_QUEUED partial-update-offer > > 269897Partial update offer2022-04-11 16:12:52.199000 > > SERVICE_FINISHED partial-update-offer > > 269896Partial update offer2022-04-11 16:12:52.049000 > > SERVICE_FINISHED partial-update-offer > > 269895Partial update offer2022-04-11 16:12:51.80 > > SERVICE_FINISHED partial-update-offer > > 269880Partial update offer2022-04-11 15:33:06.26 > > SERVICE_FINISHED partial-update-offer > > 269879Partial update offer2022-04-11 15:32:55.404000 > > SERVICE_FINISHED partial-update-offer > > 269878Partial update offer2022-04-11 15:32:55.201000 > > SERVICE_FINISHED partial-update-offer > > 269851Partial update offer2022-04-11 14:53:05.134000 > > SERVICE_FINISHED partial-update-offer > > > > How can i repair it? > > > > BTW: why the service is running at irregular time period? > > >
Re: Scheduled job problem
Unfortunelly the problem still occurs. I load the seed data (my job definition is part of seed data) every time, before I launching the Ofbiz. As far as I know, the OFBiz delete rows from the job_sandbox table sometimes. So, sometime I insert new record into job_sandbox table after the Ofbiz delete some rows in the same table. It is possible that the problem is connected with it? On 11.04.2022 23:27, Tomek wrote: Thank you for your response. I think it is possible that the service run time is longer than the 5 minutes. So, I try to use the semaphore settings. I hope that solve my problem :) Tomek On 11.04.2022 22:33, Michael Brohl wrote: Hi, is it possible that your job run time is longer than the 5 minutes scheduling interval and it is not configured against parallel execution? If yes, consider using the semaphore settings for your service (see [1]). Best regards, Michael Brohl ecomify GmbH - www.ecomify.de [1] https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=7045171#ServiceEngineGuide-serviceDefinition Am 11.04.22 um 21:27 schrieb Tomek: Hi, I have created a job: I would like to run partialUpdateOfferJob service every 5 minutes. In the beginning every thing is ok but after some time the service is running two (or even more) times at similar time. Here is a part of my data stored in job_sandbox table: job_id job_name run_time status_id parent_job_id 269925 Partial update offer 2022-04-11 17:12:44.883000 SERVICE_QUEUED partial-update-offer 269924 Partial update offer 2022-04-11 17:12:44.686000 SERVICE_QUEUED partial-update-offer 269923 Partial update offer 2022-04-11 17:12:44.526000 SERVICE_QUEUED partial-update-offer 269897 Partial update offer 2022-04-11 16:12:52.199000 SERVICE_FINISHED partial-update-offer 269896 Partial update offer 2022-04-11 16:12:52.049000 SERVICE_FINISHED partial-update-offer 269895 Partial update offer 2022-04-11 16:12:51.80 SERVICE_FINISHED partial-update-offer 269880 Partial update offer 2022-04-11 15:33:06.26 SERVICE_FINISHED partial-update-offer 269879 Partial update offer 2022-04-11 15:32:55.404000 SERVICE_FINISHED partial-update-offer 269878 Partial update offer 2022-04-11 15:32:55.201000 SERVICE_FINISHED partial-update-offer 269851 Partial update offer 2022-04-11 14:53:05.134000 SERVICE_FINISHED partial-update-offer How can i repair it? BTW: why the service is running at irregular time period?