Hello Enes,
Since the Logic App recurrence trigger doesn’t directly support day-of-week filtering, you can handle it using the "Condition" control and some basic logic.
Option 1: Use a Condition in Logic App to Check Day of Week
Keep the recurrence trigger running every weekday at 8:00 AM and 6:00 PM.
Add a "Condition" step immediately after the trigger:
Use @dayOfWeek(utcNow())
to get the current day:
Monday = 1, ..., Friday = 5, Saturday = 6, Sunday = 0
Example condition:
```sql
json
Copy
@and(greaterOrEquals(dayOfWeek(utcNow())
```
If true → proceed to start/stop VM actions.
If false → do nothing (weekend).
Utilizing a single Logic App is sufficient for this requirement.
Option 2: Separate Recurrence Triggers for Each Weekday
Create 5 recurrence triggers in the Logic App—one for each day (Mon–Fri).
Each trigger can be set to run at 8:00 AM or 6:00 PM on its respective day.
With option 2, there are no required conditions; scheduling is handled visually in a straightforward manner.
For your reference, please go through this following documentation:
Logic apps dayOfWeek
Hope this helps!