Developer forum

Forum » Ecommerce - Standard features » Scheduling index build

Scheduling index build

Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi there,

I have a site with a configured index task as follows:

What I would expect is that this task runs once a day at 7.02. What it does instead is run 24 hours after it completed the last time. The process takes more than an hour to complete (1.3 million products) and thus I end up with drifting start times and reindexing throughout the day instead of early morning after integration has run and before users hit the site.

Is there a way to make it run at a fixed time each day?

Running on 9.10 if that's relevant.

Imar

 


Replies

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
 
Scott Forsyth Dynamicweb Employee
Scott Forsyth
Reply

+1 from me too.

This comes up often and I was just getting ready to send a nudge on the old threads on this too. It just came up again last week. We want some daily tasks to run at the same time each day rather than shifting through the day over time.

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

+1

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply
This post has been marked as an answer

Hi all,
this is a bug and will be fixed asap.
BR, Dmitrij

Votes for this answer: 1
 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply
This post has been marked as an answer

Additional note

This is related to tasks run from the repository.

You can setup a schedule directly that does not use the task (yes confusing) and it will not behave like this.

Votes for this answer: 1
 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Yep, thanks, that;s how I ended up solving it.

Imare

 
Kristian Kirkholt Dynamicweb Employee
Kristian Kirkholt
Reply
This post has been marked as an answer

The bugfix is applied to Dynamicweb version 9.15.8

Get this from the download section https://doc.dynamicweb.dk/downloads/dynamicweb-9

Kind Regards
Care Support 
Kristian Kirkholt 

Votes for this answer: 1
 
Skylar Kennedy
Reply

Hello,

I'm trying to get this to work on V9.16.7. I thought it would work properly after an upgrade, and I tried saving the index task + index but it's still drifting. 

Is there anything else I can try to get this running every 12 hours? Thanks in advance. :)

Image

 

 
Morten Snedker Dynamicweb Employee
Morten Snedker
Reply

Hi Skylar,

You should not use the scheduling functionality under the repository setup. It is there for backwards compatibility. Instead, setup a scheduled task under Settings > Integration > Scheduled Task, from where you can use add-in "Build repository index". Then you'll find the drift to disappear.

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Morten,

 

Are you suggesting this as a workaround or the proper way of doing it?

 

If I understood you correctly, I would almost argue/expect it to work. Based on what you say, we have to create 1 scheduled task for each repository to ensure no "drifts" happen. This means:

  • Products
  • Users
  • Files
  • Content
  • (all of the above come with Swift for example. customers with multiple sites, shops and custom development may have more)

 

In my mind this is what's backwards compared to how DW has been doing. For example; there's 1 scheduled task to rebuild User Smart Searches; 1 scheduled task for Email Marketing Scheduler; .... I would expect that would be 1 Task to look for Repositories, and then it would be within the Repositories that we would determine which ones we want to run and when.

 

That would also mean that we could set permissions on Scheduled Tasks, and have certain users only focused within Repositories.

 

So, as a workaround this makes sense to me, but I would expect the drift to have been solved. It's also hard to explain to new people on the platform that nuance.


Best Regards,

Nuno Aguiar

 
Morten Snedker Dynamicweb Employee
Morten Snedker
Reply

Hi Nuno,

It is the proper way. The issue with the scheduler directly under the repository:
Index is set to build every hour at hh:mm 00:00. The build takes 2 minutes to complete. Next job now starts with 2 minutes offset at 01:02. Next again at 02:04. And so forth. This happens due to some time-stamping under Files\System\Diagnostics...

I believe (guessing) it has not been fixed as we would like to have scheduling all in one place, so a fix has not been worth while, as scheduling in time will disappear from this section. You are quite right, though, that Swift is shipped with scheduling directly under Repositories. I will bring this to the Swift team, as it should not be at this location.

BR
Snedker

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Morten,

 

Understood. I'll try to remember the change and focus on DW10 and the new way of doing it.

 

You must be logged in to post in the forum