Monday, November 24, 2025
HomeBusiness IntelligenceMicrosoft Cloth: Capability Value Administration Half 3, Pause Capability Throughout Christmas with Azure Logic...

Microsoft Cloth: Capability Value Administration Half 3, Pause Capability Throughout Christmas with Azure Logic Apps


Microsoft Fabric: Capacity Cost Management Part 3, Pause Capacity During Christmas with Azure Logic Apps

Within the first weblog put up of this collection, I defined that we are able to Pause and Resume a Microsoft Cloth capability from Azure Portal. Within the second weblog and its accompanying YouTube video, I confirmed you tips on how to automate the Pause and Resume actions in Azure LogicApps so the capability begins at 8:00 AM and stops at 4:00 PM. Whereas I’ve already talked about in these posts, it’s worthwhile to say once more that these strategies solely make sense for PAYG (Pay-As-You-Go) capacities and NOT the Reservation capacities. Whereas the strategy works high-quality, you might want extra fine-tuning.

Managing operational prices turns into essential for companies leveraging Microsoft Cloth capacities when the vacation season approaches. This presents a novel problem of sustaining effectivity whereas lowering pointless bills, particularly throughout Christmas when enterprise operations would possibly decelerate or pause fully.

On this put up and video, I’ll prolong the discussions from my earlier weblog and reveal tips on how to optimise your Azure Logic Apps to handle Microsoft Cloth capability in the course of the Christmas holidays.

Current Setup Recap

In earlier discussions, we’ve explored utilizing Azure Logic Apps to handle Cloth capability successfully from 8:00 AM to 4:00 PM on common enterprise days and pausing operations afterwards. This setup ensures that we’re not incurring prices when the capability isn’t wanted, significantly from 4:00 PM to eight:00 AM the subsequent morning, and all through the weekends. I encourage you to take a look at my earlier put up for extra info. That is how the present resolution appears to be like like in Azure LogicApps:

Automating Microsoft Fabric Capacity with Azure LogicApps
Automating Microsoft Cloth Capability with Azure LogicApps

Incorporating Vacation Schedules

The important thing to extending this setup for the Christmas interval lies in integrating particular vacation schedules into your current workflows utilizing Workflow Definition Language which is utilized in Azure Logic Apps and Microsoft Move. The next expression determines if the present date (in New Zealand Customary Time) falls inside the interval from December twenty fifth of the present 12 months to January 2nd of the subsequent 12 months:

and(
    greaterOrEquals(
        int(
            formatDateTime(
                convertFromUtc(
                    utcNow(), 
                    'New Zealand Customary Time'
                ), 
                'yyyyMMdd'
            )
        ), 
        int(
   concat(
    formatDateTime(
     utcNow()
     , 'yyyy'
     )
    , '1225'
    )
   ) 
    ), 
    lessOrEquals(
        int(
            formatDateTime(
                convertFromUtc(
                    utcNow(), 
                    'New Zealand Customary Time'
                ), 
                'yyyyMMdd'
            )
        ), 
        int(
   concat(
    add(
     int(
      formatDateTime(
       utcNow()
       , 'yyyy'
       )
      )
     ,1
     )
    , '0102'
    )
   )
  )
)

The next part explains how the expression works.

Total Construction

The expression makes use of the and perform to mix two situations:

  1. Checking if the present date is larger than or equal to December twenty fifth of the present 12 months.
  2. Checking if the present date is lower than or equal to January 2nd of the subsequent 12 months.

First Situation: Present Date >= December twenty fifth

greaterOrEquals(
    int(
        formatDateTime(
            convertFromUtc(
                utcNow(), 
                'New Zealand Customary Time'
            ), 
            'yyyyMMdd'
        )
    ), 
    int(
        concat(
            formatDateTime(
                utcNow(), 
                'yyyy'
            ),
            '1225'
        )
    )
)
  1. utcNow(): Will get the present UTC date and time.
  2. convertFromUtc(utcNow(), 'New Zealand Customary Time'): Converts the present UTC date and time to New Zealand Customary Time.
  3. formatDateTime(convertFromUtc(utcNow(), 'New Zealand Customary Time'), 'yyyyMMdd'): Codecs the transformed date to a string in ‘yyyyMMdd‘ format.
  4. int(formatDateTime(...)): Converts the formatted date string to an integer.
  5. concat(formatDateTime(utcNow(), 'yyyy'), '1225'): Concatenates the present 12 months with ‘1225’ to kind a string representing December twenty fifth of the present 12 months.
  6. int(concat(...)): Converts the concatenated date string to an integer.
  7. greaterOrEquals(int(...), int(...)): Compares if the present date integer is larger than or equal to the integer representing December twenty fifth of the present 12 months.

Second Situation: Present Date <= January 2nd

lessOrEquals(
    int(
        formatDateTime(
            convertFromUtc(
                utcNow(), 
                'New Zealand Customary Time'
            ), 
            'yyyyMMdd'
        )
    ), 
    int(
        concat(
            add(
                int(
                    formatDateTime(
                        utcNow(), 
                        'yyyy'
                    )
                ), 
                1
            ), 
            '0102'
        )
    )
)

This a part of the expression is similar to the primary situation, with the important thing distinction being the comparability date:

  1. Add 1 to the present 12 months:
   add(
       int(
           formatDateTime(
               utcNow(), 
               'yyyy'
           )
       ), 
       1
   )

This calculates the subsequent 12 months by including 1 to the present 12 months.

  1. Concatenate with ‘0102’:
   concat(
       add(...), 
       '0102'
   )

This creates a string representing January 2nd of the subsequent 12 months. The remainder of the steps are the identical as the primary situation, changing the present date and the comparability date to integers and utilizing lessOrEquals to verify if the present date is lower than or equal to January 2nd of the subsequent 12 months.

Combining Situations

The and perform combines the 2 situations:

  1. The present date is larger than or equal to December twenty fifth of the present 12 months.
  2. The present date is lower than or equal to January 2nd of the subsequent 12 months.

If each situations are true, the general expression returns true, indicating that the present date is inside the specified vacation interval.

Simply keep in mind, the code considers the Christmas interval in New Zealand, so that you must change it to suit your state of affairs.

Modify the Earlier Azure LogicApps Workflow

On Azure Portal, navigate to your Azure LogicApps and open the answer created earlier than, then comply with these steps:

  1. Click on the (+) button to insert a brand new step between the Learn a useful resource and Situation, Test Time of Day
  2. Click on the Add and motion choice
  3. Seek for Situation
  4. Click on the Situation management
Add a new condition between actions in Azure LogicApps
Add a brand new situation between actions in Azure LogicApps
  1. Click on the primary situation textual content field and click on the fx choice to enter the expression
  2. Copy the expression from the earlier part and paste it into the expression field
  3. Click on the Add button
  1. Go away the operation to is the same as
  2. Kind in true as its comparability worth
  1. Rename the situation to Test if the date is in Xmas interval
Add an expression to a condition
Add an expression to a situation
  1. Transfer your complete Situation, Test Time of Day to the False situation else motion
Move an entire action to a condition else action
Transfer a complete motion to a situation else motion
  1. Proper-click the Situation, Test if Standing is Lively situation and click on the Copy Total Motion choice
  2. Click on the (+) button on the True situation motion of the Test if the date is in Xmas interval situation
  3. Click on the Paste an motion choice
Copy and paste an entire action
Copy and paste a complete motion
  1. Rename the copied situation and motion

The ultimate resolution ought to appear to be beneath:

Azure LogicApps keeping Fabric capacity paused during Christmas
Azure LogicApps retaining Cloth capability paused throughout Christmas

Don’t forget to avoid wasting the answer. Once we run the ultimate resolution, the workflow checks the date to seek out out if we’re at the moment within the Christmas interval or not. Relying on the outcomes, it both retains the capability working or

Conclusion

Adjusting your Azure Logic Apps to incorporate a vacation schedule, significantly throughout Christmas, can considerably affect your operational prices and effectivity.

Keep tuned for extra insights, and don’t neglect to take a look at the earlier movies on this subject for those who haven’t already. They supply a stable basis for understanding tips on how to harness the complete potential of Azure Logic Apps for cloth capability administration.

As all the time, don’t forget to subscribe and go away your feedback beneath.

Comply with me on LinkedIn, YouTube, and @_SoheilBakhshi on X (previously Twitter).


Uncover extra from BI Perception

Subscribe to get the most recent posts despatched to your e mail.



RELATED ARTICLES

Most Popular

Recent Comments