Scheduled Tasks

Scheduled tasks are events which have been scheduled to run at certain intervals, e.g. once a day, once an hour, or once a week. For instance, you can set up a scheduled task for rebuilding your indexes, for scheduling emails, or for running data integration activities.

The scheduled tasks node gives you access to a list of all scheduled tasks created on the system (Figure 1.1).

Figure 1.1 Scheduled tasks

From the list of scheduled tasks, you can view, run or edit the tasks – or remove them altogether. You can also right-click an existing scheduled task and copy it.

Impersonation has been deprecated due to security, and button will be removed.

From Dynamicweb 9.3,  you can see when taskexecuter was last executed on this solution above the scheduled task list - the normal interval is every 5 minutes - and will be informed if there is a problem with the serverside scheduled task job.

While some scheduled tasks are created automatically by other parts of the system, you can also create scheduled tasks manually by clicking Add in the toolbar to open the scheduled task configuration view (Figure 2.1).

Figure 2.1 Creating a scheduled task

Here you can define the task name, the start time and end time, and the repetition interval, and you can see the Activation URL, which can be used to trigger the scheduled task remotely.

Each task must also have an action (“activation”) associated with it – your options are:

  • Trigger an URL (e.g. a data integration job URL)
  • Call a Method from the API
  • Select an add-in, such as Clean up logs or Run SQL add-in

The following scheduled task add-ins are available on an up-to-date Dynamicweb solution:

Add-in name

Used for

Comments

Assign products to one or more groups, depending on some rules

 

 

Build Ecommerce Assortment Items

Rebuilds assortments

 

Build repository index

Rebuilds a specific repository index with a particular builder action (partial), and once a day rebuilds a second builder action (full).

 

Calculate users smart search results

Recalculates user smart searches

 

Channable orders transport

Synchronizes orders between Dynamicweb and a Channable account

 

Cleanup logs

Evaluates and triggers automatic log cleaning rules

Deletes logfiles if auto-cleaning is enabled

 

Deploy data items from upload folder

Deploys depoyment packages located in a specified folder. Can also send notification emails to report on failures.

 

Digital assets checkin on products Automatically assigns assets to asset categories See more here

Email Marketing flow scheduler

 

 

Feed File Export Task

Saved data in a PIM feed to a file

 

PIM Email Notification Add-In

Sends out  PIM notification emails.

 

Import IceCat product information

 

 

PIM Email Notification Addin

 

 

Place recurring order

Places recurring orders

 

Process tracking data

 

 

Product version cleanup

Automatically purges old versioning data

 

Redeem expired points

Removes expired loyalty points from user accounts

 

Run SQL add-in

Executes the SQL query defined on the add-in

 

Previous Dynamicweb versions also contained a set of add-ins for connecting to Amazon Marketplace. As of Dynamicweb 9.9 these are considered deprecated. We recommend using Channable instead.

Normally, scheduled tasks execute the first time Windows Scheduled Task is run after their Next Run time is reached. To ensure that data is imported/exported/cleaned/etc. at the righ time, you then scheduled mutually dependent jobs so that they execute in the correct order. However, if you have jobs where the run time varies considerably – e.g. a batch import job in an integration setup – you might not be able to appropriately gauge how much time you need between job. In those scenarios you can sequence jobs in the following manner:

  • Identify the jobs you want to sequence
  • Make sure they run at the same time – e.g. Daily at 10.00 PM. This creates a sort of “grouping” where sort order matters
  • Use the Sort button to sort the jobs in the sequence you want to use
  • For each job after the first, check the Run if previous task executed successfully checkbox

This ensures that all jobs are queued for execution at the same time, and that they will be executed in the sort order specified once the previous job is completed.

This section contains information about advanced and edge-case scenarios.

You may experience problems with executing scheduled tasks on SSL servers - this is because previous implementations of Scheduled Tasks did not add the -k (--insecure) parameter to tasks on the IIS.

The solution is to delete the task scheduler in Windows Task Scheduler, and force Dynamicweb to create a new instance by creating a new scheduled task.

You can also edit existing tasks and add the -k parameter manually.

The Windows scheduled task is not found warning is shown when windows scheduled task is not installed on the server. If you need to suppress this warning - e.g. if the tasks are run on a separate server - this can be done using a setting under Settings > System > Solution settings.

On advanced or very data-intensive solutions you may experience that scheduled tasks time out when longer than 10 or 30 minutes. 

In that case you can customize the timeout limit by editing the following global setting (value in seconds):

  • /Globalsettings/System/ScheduledTasks/ScriptTimeout