![Microsoft Fabric: Capacity Cost Management Part 3, Pause Capacity During Christmas with Azure Logic Apps](https://i0.wp.com/biinsight.com/wp-content/uploads/2024/07/Automate-Pause-and-Resume-Fabric-Capacity-with-LogicApps-Episode-3-Pause-Fabric-Capacity-During-Xmas-1024x576.png?resize=900%2C506&ssl=1)
In the first blog post of this series, I explained that we can Pause and Resume a Microsoft Fabric capacity from Azure Portal. In the second blog and its accompanying YouTube video, I showed you how to automate the Pause and Resume actions in Azure LogicApps so the capacity starts at 8:00 AM and stops at 4:00 PM. While I have already mentioned in those posts, it is worthwhile to mention again that these methods only make sense for PAYG (Pay-As-You-Go) capacities and NOT the Reservation capacities. While the method works fine, you may need more fine-tuning.
Managing operational costs becomes crucial for businesses leveraging Microsoft Fabric capacities when the holiday season approaches. This presents a unique challenge of maintaining efficiency while reducing unnecessary expenses, especially during Christmas when business operations might slow down or pause entirely.
In this post and video, I will extend the discussions from my previous blog and demonstrate how to optimise your Azure Logic Apps to manage Microsoft Fabric capacity during the Christmas holidays.
Extending the Logic Apps Workflow
Existing Setup Recap
In earlier discussions, we’ve explored using Azure Logic Apps to manage Fabric capacity effectively from 8:00 AM to 4:00 PM on regular business days and pausing operations afterwards. This setup ensures that we’re not incurring costs when the capacity isn’t needed, particularly from 4:00 PM to 8:00 AM the next morning, and throughout the weekends. I encourage you to check out my previous post for more information. This is how the existing solution looks like in Azure LogicApps:
![Automating Microsoft Fabric Capacity with Azure LogicApps](https://i0.wp.com/biinsight.com/wp-content/uploads/2024/07/Snag_5a6decd-1024x870.png?resize=900%2C765&ssl=1)
Incorporating Holiday Schedules
The key to extending this setup for the Christmas period lies in integrating specific holiday schedules into your existing workflows using Workflow Definition Language which is used in Azure Logic Apps and Microsoft Flow. The following expression determines if the current date (in New Zealand Standard Time) falls within the period from December 25th of the current year to January 2nd of the next year:
and(
greaterOrEquals(
int(
formatDateTime(
convertFromUtc(
utcNow(),
'New Zealand Standard Time'
),
'yyyyMMdd'
)
),
int(
concat(
formatDateTime(
utcNow()
, 'yyyy'
)
, '1225'
)
)
),
lessOrEquals(
int(
formatDateTime(
convertFromUtc(
utcNow(),
'New Zealand Standard Time'
),
'yyyyMMdd'
)
),
int(
concat(
add(
int(
formatDateTime(
utcNow()
, 'yyyy'
)
)
,1
)
, '0102'
)
)
)
)
The following section explains how the expression works.
Continue reading “Microsoft Fabric: Capacity Cost Management Part 3, Pause Capacity During Christmas with Azure Logic Apps”