Logic app to run multiple days and schedule

Azure-learning 56 Reputation points
2022-09-12T18:09:22.643+00:00

I need to schedule a logic app run on Wednesday 1 PM, 3 PM and 7 PM IST (3 times in a day) and on Saturday at 7 PM IST (just once).

Can we schedule the same logic app using above schedules.

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,086 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MayankBargali-MSFT 70,141 Reputation points
    2022-09-12T20:34:01.373+00:00

    @NGaur-3476 Thanks for reaching out. Only supported recurrences are documented in Example recurrences and for more details you can refer to this document.
    As per your schedule there is no out of the box solution but you can leverage different date and time function to define the logic as per your requirement.

    I have used the reoccurrence trigger triggering every day at 1,3 and 7 PM IST everyday. Now my condition has the logic to check whether it is Wednesday 1 PM, 3 PM and 7 PM IST or Saturday at 7 PM IST as below.
    Now you need to write your workflow logic inside the True condition. If the condition is True then only your workflow will get executed.

    240187-image.png

    Code View:

    {  
        "definition": {  
            "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",  
            "actions": {  
                "Condition": {  
                    "actions": {},  
                    "expression": {  
                        "and": [  
                            {  
                                "equals": [  
                                    "@dayOfWeek(convertTimeZone(utcNow(),'UTC','India Standard Time'))",  
                                    3  
                                ]  
                            },  
                            {  
                                "or": [  
                                    {  
                                        "equals": [  
                                            "@dayOfWeek(convertTimeZone(utcNow(),'UTC','India Standard Time'))",  
                                            6  
                                        ]  
                                    },  
                                    {  
                                        "equals": [  
                                            "@formatDateTime(convertTimeZone(utcNow(),'UTC','India Standard Time'),'HH')",  
                                            19  
                                        ]  
                                    }  
                                ]  
                            }  
                        ]  
                    },  
                    "runAfter": {},  
                    "type": "If"  
                }  
            },  
            "contentVersion": "1.0.0.0",  
            "outputs": {},  
            "parameters": {},  
            "triggers": {  
                "Recurrence": {  
                    "evaluatedRecurrence": {  
                        "frequency": "Day",  
                        "interval": 1,  
                        "schedule": {  
                            "hours": [  
                                "1",  
                                "3",  
                                "7"  
                            ]  
                        },  
                        "timeZone": "India Standard Time"  
                    },  
                    "recurrence": {  
                        "frequency": "Day",  
                        "interval": 1,  
                        "schedule": {  
                            "hours": [  
                                "13",  
                                "15",  
                                "19"  
                            ]  
                        },  
                        "timeZone": "India Standard Time"  
                    },  
                    "type": "Recurrence"  
                }  
            }  
        },  
        "parameters": {}  
    }  
    

    Note : The above is only for reference purpose. Please verify and test it before using it in your workflow.

    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.