One of the most common requirements in integration projects is the need to trigger a process at a specific time. Whether it’s a nightly batch process or an hourly data sync, knowing how to schedule a BizTalk Server orchestration effectively is a core skill for any integration developer.
📝 One-Minute Brief
Scheduling a BizTalk orchestration can be achieved through three main methods: using Windows Task Scheduler to drop files, using the SQL Adapter with a stored procedure, or utilizing the BizTalk Scheduled Task Adapter. The latter is highly recommended as it centralizes configuration within the BizTalk Administration Console, making maintenance and management much easier.
So the main question that developers and architects raise is: How can we schedule an orchestration to run at predetermined time intervals or to start at a predetermined hour?
While BizTalk Server doesn’t have a “native” built-in scheduler in the orchestration engine, there are three proven ways to achieve this:
- Windows Task Scheduler (The File Drop Method)
- Using Windows Task Scheduler to drop a file to the specified receive location
- This is the most “old-school” approach. You create a script or a simple console application that drops a “dummy” XML file into a folder monitored by a BizTalk Receive Location.
- Pros: Easy to set up using standard Windows tools.
- Cons: Hard to manage. Configuration is split between Windows Task Scheduler and BizTalk, making it difficult to monitor and maintain over time.
- The SQL Adapter Method
- Using SQL Adapter by implementing a simple stored procedure that creates a “dummy” message that initiates your orchestration
- Pros: Reliable if your solution already relies heavily on SQL Server.
- Cons: Requires additional database artifacts (tables/stored procedures) just to trigger a process, adding unnecessary complexity.
- Using SQL Adapter by implementing a simple stored procedure that creates a “dummy” message that initiates your orchestration
- The BizTalk Scheduled Task Adapter (The Recommended Way)
- Or using BizTalk Scheduled Task Adapter (you can download this from GitHub: https://github.com/sandroasp/BizTalk-Scheduled-Task-Adapter )
In my experience, the BizTalk Scheduled Task Adapter is by far the superior choice. This community adapter allows you to configure specific schedules (daily, weekly, or at intervals) directly within the BizTalk Administration Console.
Why is this the best method?
- Clean Architecture: It keeps your solution professional and easier for other administrators to understand.
- Centralized Management: Everything is in one place. You configure the schedule directly on the Receive Location.
- No External Dependencies: You don’t need Windows Task Scheduler or SQL jobs.
While the title mentions 2004/2006, this adapter has been updated for newer versions (2010, 2013, 2016, 2020).
Hope you find this helpful! If you liked the content or found it useful and would like to support me in writing more, consider buying (or helping to buy) a Star Wars Lego set for my son.