Developer forum

Forum » Dynamicweb 10 » Scheduled Tasks and local development issues

Scheduled Tasks and local development issues

Kevin Steffer
Kevin Steffer
Reply

We've issues running local development with a lot a registered scheduled tasks, because they are actually all executed.

In DW9 we had the TaskExecute.aspx running that wasn't setup on local dev machines and therefor we never had issue with this before, but now in DW10 all tasks are started by the application itself.

Could we have some sort of setting somewhere what is NOT in the database where we could disable the whole Scheduled Task system so that they only can be run manually with it turned off?


Replies

 
Rasmus Sanggaard Dynamicweb Employee
Rasmus Sanggaard
Reply

Hi Kevin,

Yes, scheduling is now handled in the application by the IHostedService interface. Could you provide a few more details about your setup? I don’t understand why you can’t deactivate the tasks so they don’t run. This could probably also be done through automation with some custom coding.

BR Rasmus Sanggaard

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Here's a scenario that I run into quite often:

1. Take a backup from production (files and database). The backup has an order that has been completed, but not been submitted yet

2. Set up a copy on my local machine

3. The site starts up

4. Scheduled tasks are executed before I get a chance to disable them.

Ooops, now I have a duplicate order in production.

Also, we have sites with 20 to 30 scheduled tasks or even more. Having to disable each and every one of them (and more importantly, knowing and remembering I must disable them) is a lot of work every time I refresh my local environment with a copy of the production database.

On 9 this was never an issue as you had to set up a Windows Scheduled task to hit the DW task scheduler which you would almost never do locally. I like the new implementation in 10, but a global kill switch for all tasks would be much appreciated.

Imar

 

 
Rasmus Sanggaard Dynamicweb Employee
Rasmus Sanggaard
Reply

Hi,

 

Right understood, thanks for the scenario. I have added a task and we will look into a possiblity to add a global setting to disable all tasks from executing. #26328

 

BR Rasmus Sanggaard

 
Kevin Steffer
Kevin Steffer
Reply

Think Imar explained it very well.

We discovered this in a very unfortunate way because we share a development database between developers. And it recently got a new scheduled tasks that cleaned up EcomDetails if the images were removed on disk. Well our development machine don't have any assets which resulted in an empty EcomDetails table :(

 

You must be logged in to post in the forum