Developer forum

Forum » Ecommerce - Standard features » Scheduled task index build not triggered at correct time

Scheduled task index build not triggered at correct time

Martin Grønbekk Moen
Martin Grønbekk Moen
Reply

We have tried to setup a scheduled task to run a full product index build every night at 03.00.
The task is never triggered at that time, but instead run at random in day time between 13.00 and 15.00.

Have anyone seen this before? We are running on Azure, might that have anything to say? 


Replies

 
Nicolai Pedersen
Reply

Hi Martin

It might have something to do with the region the datacenter resides... Also ensure you have set it up correctly from here:

https://doc.dynamicweb.com/get-started/introduction/installation/deploying-to-microsoft-azure

BR Nicolai

 

 
Martin Grønbekk Moen
Martin Grønbekk Moen
Reply

Only difference I can see from the setup on doc-site and our setup is that we use data center "West Europe" not "North Europe" since it has proven to be faster.

But there is another issue with this task execution. I could live with different timezones, we can just adjust it to match the timezone, no worries.
The bigger problem is that the execution move slightly from day to day. It started out at 13.00, now it executes close to 15.00, and it is moving every day.

We need to be sure that the task execute at de exact time we tell it to execute, and not change slightly every day.

 
Nicolai Pedersen
Reply

Which version?

Also be aware that you have a checkbox on the task that will calculate next run time based on start time or end time. Using the latter will move the execution time everytime the task has run.

BR Nicolai

 
Martin Grønbekk Moen
Martin Grønbekk Moen
Reply
This post has been marked as an answer

Version is 9.5.5

That checkbox you are talking about, sounds like a very good feature, but I cant see it anywhere.
Please see attached screenshot.

vik-12.png
Votes for this answer: 1
 
Nicolai Pedersen
Reply

Hi Martin

Tasks in repositories does not have that setting. Try to create a regular schedule instead, see dump.

 
Nicolai Pedersen
Reply
Capture.PNG
 
Martin Grønbekk Moen
Martin Grønbekk Moen
Reply

Thanks!
But I find this a bit risky, due to the setting "Time to build secondary". I want the secondary to be built when the primary is finished, and not only finished but successfully finished.
What will happen in this setup if the primary fails? Will the secondary be started even though the primary failed? If so we cant really use this approach.

 
Steffen Kruse Hansen Dynamicweb Employee
Steffen Kruse Hansen
Reply

Hi Morten,

I have looked at the code in the "Build repository index" provider, it should work the way you describe.

The way this provider works is that the build selected in "Build" will run everytime the ScheduledTask runs, and the "Secondary Build" will only run at the specified time. In both of these cases all instances in the selected Index will be rebuild in the following way.

First we build all the instances, which isn't the current instance (from the IndexBalancer), and if just one of these are succesfully build, we will also build the current instance, otherwise we won't touch it.

However... We have a registered bug on the IndexBalancer (TFS#58597), where it can select a current instance, which state is "Failed" eventhough there are an instance with the state "Completed". This makes the logic above unpredictable. This bug has been fixed and is awaiting QA to test it. After that a new version of the "Dynamicweb.Indexing.Lucene" package will become available (1.0.17) with the fix.

I hope it answers at least some of your questions.

Best regards,

Steffen 

 
Martin Grønbekk Moen
Martin Grønbekk Moen
Reply

This is still not working. Tried the settings you mentioned, but it will not run at the time I want it to run.
We are using Azure Scheduled task, and it is set up as in the guide on doc site.

 

vik-13.png vik-14.png
 
Nicolai Pedersen
Reply

Hi Martin

I've asked support to contact you.

BR Nicolai

 

You must be logged in to post in the forum