BizTalk Scheduled Task Adapter 4.0: Introduction and Installation process

Posted: June 12, 2012 in BizTalk
Tags: , , ,

The BizTalk Scheduled Task Adapter is an in-process receive adapter that executes a prescribed task on a daily, weekly or monthly schedule. The adapter is configured entirely within BizTalk, all configurations is stored within the SSODB and can be exported and imported via binding files.

The schedule capabilities are similar to those available with the Windows Scheduled Task Service.

Four simple tasks are included in this version:

  • XmlStringStreamProvider – generates a BizTalk message from a configured Xml string
  • FileStreamProvider – generates a BizTalk message from the contents of a file
  • HttpDownload – generates a BizTalk message from data downloaded from a web site
  • SQLStreamProvider – generates a BizTalk message from the contents of a SQL Query (similar to the old SQL adapter)

Custom tasks can be created. Any .NET class that implements the appropriate interface can be scheduled.

Release History

This adapter is available since BizTalk Server 2004.

  • Release 1.02: last release in Apr 20 2008 by Greg Forsythe, this adapter works with BizTalk Server 2004, BizTalk Server 2006 and BizTalk Server 2006 R2. Compiled in .NET Framework 1.1
  • Release 2.0: last release in Apr 20 2008 by Greg Forsythe, this adapter works with BizTalk Server 2006 and BizTalk Server 2006 R2. Compiled in .NET Framework 2.0
  • Release 3.0: release in Aug 10 2010 by Greg Forsythe, this adapter was tested to work on BizTalk Server 2009. Compiled in .NET Framework 2.0
  • Release 4.0: release in June 12 2012 by Sandro Pereira, this adapter was tested to work on BizTalk Server 2010. Compiled in .NET Framework 4.0

The Scheduled Task Adapter v4.0 will work with:

  • BizTalk Server 2010
  • .NET Framework 4.0


Installation Process

To install the adapter run "ScheduledTaskAdapter.msi".

  • In the “Welcome” screen press “Next”.


  • In the “Select Installation Folder” screen you must set the installation locations were you what to install the adapter.


  • The following screens are very straightforward – In the “Confirm Installation” screen press “Next”, then it will appear the installation progress and assuming all goes well a completion screen.



The setup will install the following assemblies in the selected folder (Default: C:\Program Files (x86)\Biztalk ScheduledTask Adapter):

  • Biztalk.Adapter.ScheduledTaskProperties.dll
  • Calendar.Schedules.dll
  • Microsoft.BizTalk.CommonSettings.dll
  • Microsoft.BizTalk.SqmFramework.dll
  • ScheduledTaskAdapter.Admin.dll
  • ScheduledTaskAdapter.dll
  • ScheduledTaskAdapter.TaskComponents.dll
  • stdole.dll

The setup will add the following assemblies to the Global Assembly Cache (GAC)

  • Biztalk.Adapter.ScheduledTaskProperties.dll
  • Calendar.Schedules.dll
  • ScheduledTaskAdapter.dll
  • ScheduledTaskAdapter.Admin.dll
  • ScheduledTaskAdapter.TaskComponents.dll


Register the Adapter with BizTalk

As it happens with all adapters that we installed on our BizTalk Servers before we can begin to use it we need to register or configure the adapter. To accomplish that we need to:

  • Open BizTalk Administration Console
  • In the console left tree, expand “BizTalk Server Administration –> BizTalk Group –> Platform Settings” and then “Adapters”
  • Right-click on “Adapters” and add a new adapter by selecting the option “New –> Adapter”


  • In the “Adapter Properties” window
    • Set the name of the adapter: Name = Schedule
    • In the adapter combo box select the option: Schedule
    • Set the description of the adapter: “BizTalk Scheduled Task Adapter. The schedule capabilities are similar to those available with the Windows Scheduled Task Service.” (this property is optional but I would suggest to always be filled)


Note: This configuration requires that you restart the host instance associated with the adapter.


Using the adapter Context Properties

To utilize the Scheduled Task adapter’s context properties within a filter or orchestration the Biztalk.Adapter.ScheduledTaskProperties.dll must be deployed into the BizTalkMgmtDb.

This can be achieved using the Biztalk Deployment Wizard or equivalent tool.

Note: This step is optional; you only need to do this if you want to use Scheduled Task adapter’s context properties within a filter or orchestration.

As previously mentioned, you can deploy Biztalk.Adapter.ScheduledTaskProperties.dll in various ways; I suggest that you do the following steps:

  • Open BizTalk Administration Console
  • In the console left tree, expand “BizTalk Server Administration –> BizTalk Group” and then “Applications”
  • Right-click on “Applications” and add a new application by selecting the option “New –> Application”


  • In the “Adapter Properties” window
    • Set the name of the application: BizTalk.Global
    • Set the description of the application: “Application that contain common resources to several applications” (this property is optional but I would suggest to always be filled)


  • Expand the application created previous and select the option “Resources”
  • Right-click and add a new BizTalk resource by selecting the option “New –> BizTalk Assemblies…”


  • In the “Add Resources” window select “Add…” button and from the installation directory select the DLL “Biztalk.Adapter.ScheduledTaskProperties.dll”
    • And select the options: “Overwrite all”, “Add to the global assembly cache on add resource (gacutil)” and “Add to the global assembly cache on MSI file install (gacutil)”


  • Select “OK” button

Important note: The BizTalk assembly containing the orchestration code must also add this assembly as a reference

List of improvements in version 4.0

In this new version are available small improvements compared to the current version (3.0). We can highlight the following improvements or changes:

  • 24 hours support in “start time” property. Previous versions had an issue with setting the start time, as it shown 12 hours watch but no AM/PM.
  • Daily scheduler review. Solved a small bug on Daily Properties: unable to switch between “Every day” and “on these days”
  • Installation experience improved. You no longer need to manually add the DLL in GAC.
  • Support for 32 and 64 bit Host Instances.
  • Compiled in Visual Studio 2010 and .NET Framework 4.0.
  • Optimized for BizTalk Server 2010.
  • Documentation improved.
  1. Miguel Carvalho says:

    Olá Sandro!

    Antes te mais muito obrigado pelo desenvolvimento da versão 4.0 que permite agora a utilização com a versão 2010 do Biztalk! Infelizmente estou a ter alguns problemas em usar o componente, mas vou descrever em Inglês pois acho que poderá ser útil para outros utilizadores.

    I’m trying to use the component in Biztalk 2010, but unfortunately it is not work properly. Biztalk claims that the Microsoft.BizTalk.Scheduler.dll, version is not present. This was the case before I found the dll in Biztalk’s install folder. I installed it in GAC, but somehow it ended up in the old GAC, opposite to what I expected (C:\Windows\Microsoft.NET\assembly\GAC_MSIL).

    Moreover, Biztalk throws the following error in Windows Event Log (Event ID 5740): The adapter “ScheduledTask” raised an error message. Details “FileTransfer.TransmitTrigger: has been disabled”. FileTransfer.TransmitTrigger is the name in the General Tab.

    Can it be that I’m using the wrong Microsoft.BizTalk.Scheduler.dll assembly? If so, where to find the correct one?

    Desde já muito obrigado.

    • Akshay Shah says:

      I am also getting the same error while using in BizTalk Server 2013.
      Please suggest what needs to be done.

      • Miguel Carvalho says:

        Hi Akshay,

        although I never used the adapter in BizTalk 2013, what I observed in BizTalk 2010 is that the adapter writes these messages in the event log as standard when you restart the receive location, so in these situations you should see this as an information rather than an error/warning.
        I found out later that my process wasn’t running due to a change in the way the XML is generated in this version of the adapter, since we migrated from BizTalk 2006 and used therefore the old adapter before.

        Hope it helps

  2. Anonymous says:

    It appears this adapter failed when the time changed to Daylight Savings Time. Has anyone encountered this before? Is it a issue with cache?

  3. Tomi Koivisto says:

    Are you planning to build and test this with VS2012 and Biztalk 2013?

  4. Charles says:

    Hi Sandro,

    What is the predicted behavior of the adapter in a non-clustered Multi-server environment?

    Can I expect multiple activations when hostinstances associated with the adapter run on multiple servers? If so, can/must it be clustered?



    • Hi Charles,

      Yes you will get multiple activations. The reason is that a receive location is operational on all running host instances, it will be fire once for every running host instance.

      If you have two or more host instances running in the same host, the receive port running the scheduler task adapter that is running in this host you will get two or more messages published at the same time.

      So you can only have a single instance of any Scheduled Task adapter receive location running at any time. Otherwise you will receive duplicate messages.

      You can have two way to provide fail over:
      – Have the host instance service running on one server and stopped on the other server.
      – Or you can use Cluster Services to automate this.

  5. Hi Sandro,

    Any update on release of the new version for BizTalk Server 2013?



    • Hi Gyanendra,
      I’m doing test with this version and the good news is that for now I didn’t detect any kind of problems in running BizTalk Scheduled Task Adapter 4.0 on BizTalk Server 2013.

      I can say that the bases features tested in this version are fully compatible with BizTalk Server 2013.

  6. Tom says:

    Hi Sandro,

    When configuring a monthly activation interval, on the ‘second Tuesday’, using either one month or multiple months, we receive this error.

    The Messaging Engine failed to add a receive location “Rcv_Assessment_Schedule” with URL “schedule://Monthly/Assessment” to the adapter “Schedule”. Reason: “Time-out interval must be less than 2^32-2.
    Parameter name: dueTime”.

    When reopening the Scheduler configuration window, the ‘second Tuesday’ radio check button is UnSelected.

    Has anyone found this same issue, is there a work around to set a typical quarterly activation schedule?

  7. Nilesh says:

    Hi Sandro,
    I am using the scheduledtaskadapter in BizTalk Servewr 2013R2 to trigger hourly incementatl data migration process. I have found one issue that when I stop the application it creates below error in the event log.
    I have another strange issue found in production. Due to load issue sometimes I restart the host instances, during this time I found that two instances of orchestration are fired. I am still analysing the issue but from log/investigation I could see multiple instances of orchestrations are fired.

    The adapter “ScheduledTaskAdapter” raised an error message. Details ”
    test: has been disabled”.

    Thanks in advance.

    Nilesh Sawant

  8. Amit Patel says:

    Hi Sandro,

    I have an requirement where I want to read multiple files from location and perform this schedule task activity based on input of files,…

    I am trying to change the GetStream Method so that it can return stream array to adapter .. but it is getting failed with below error.. at receive port

    task is shutting down. Details:”Unable to cast object of type ‘ScheduledTaskAdapter.TaskComponents.FileStreamProvider’ to type ‘ScheduledTaskAdapter.TaskComponents.IScheduledTaskStreamProvider’.”.

    I have changed method as below

    public Stream[] GetStream(object parameter)
    string inputPath = Convert.ToString(parameter);
    string[] totalFiles = Directory.GetFiles(inputPath);
    Stream[] myStream = new Stream[totalFiles.Length];
    for (int i = 0; i < totalFiles.Length; i++)
    myStream[i]= new FileStream(totalFiles[i], FileMode.Open, FileAccess.Read);

    return myStream;


    Amit Patel

  9. Hi Sandro, this adapter works great. Thanx for your work. I noticed when used in conjunction with the biztalk deployment framework, the deployment fails because it seems to miss some kind of reference to Microsoft.BizTalk.Scheduler. Deploying or undeploying throws

    : error : Could not validate TransportTypeData, Address or Public Address properties for Receive Location ‘xxxxxxxx’. Could not load file or assembly ‘Microsoft.BizTalk.Scheduler, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The system cannot find the file specified.

    I use BizTalk 2013 R2 Standard and BTDF 6.0. Do you have any clues?



    • Michael Benage says:

      I am having the same issue. I read a few things online that said that you needed to manually add the Microsoft.BizTalk.Scheduler dll to the GAC. However, I have done that and I’m still getting the same error. Anyone have any ideas? I really like the adapter and would like to use it but the error it is causing in the deployment framework is a deal-breaker.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s