Hi Parsa Bahrami,
Thank you for posting query in Microsoft Q&A Platform.
If I understand correctly, you mean to say trigger should run pipeline every 2 hours daily. But it should run pipeline only between 6AM to 10PM windows. After 10PM till next 6AM it should not run pipeline. Please correct me if my understanding is wrong.
There is no direct way of doing this within trigger. You need to handle this in your Pipeline. Follow below steps to achieve same.
Step1: Create a trigger which start time is 6AM and setup reoccurrence for every 2 hours. This will run your pipeline every day for every 2 hours.
Step2: Since we dont want to run pipeline from 10PM to 6AM. Inside, your pipeline have a if activity
to check the trigger time. If trigger time or pipeline run time is >= 10PM OR <= 6AM. then for that executions don't run your logic. For all other windows run your logic by keeping activities inside else or if blocks.
This way technically, when if your trigger running pipeline, it will technically valid the run time and then exclude or include activities to run.
Please note, pipeline run time or trigger time you can get from system variables or from trigger variables. Check below videos to know more about them.
System Variables in Azure Data Factory
Schedule Trigger in Azure Data Factory
Hope this helps. Please let me know if any further queries.
Please consider hitting Accept Answer
button. Accepted answers help community as well.