Help of logic of code Smart-watring

i want to do Smart-watering
Desired temperature (in degrees Celsius).

High temperature operating time (in minutes).

Low temperature operating time (in minutes).

Operating conditions:
When the outside temperature is higher than the desired temperature, the irrigation will operate for the time set for high temperature.

When the outside temperature is lower than or equal to the desired temperature, the irrigation will operate for the time set for low temperature.

Irrigation times should be scheduled to occur twice a day, taking into account that priority will be given to irrigation in the evening or in the shade.

haveing an issue trying to tpye the logic -code for Irrigation times should be scheduled to occur twice a day, taking into account that priority will be given to irrigation in the evening or in the shade.

my code strucutre

Welcome That sounds like an interesting project that could be a lot of fun! Not sure what the code structure is, it appears to be a folder tree in a file system.

Please keep in mind that we are not a free design or code-writing service. We’re more than happy to help with your design or code, but we need you to make an initial attempt. Please design and write your code, then post it along with an explanation of what’s not working properly.

  1. Show Your Work First: Before asking for assistance, make an attempt to design or write the code yourself. Share your work along with details about what isn’t working.
  2. Provide Clear Documentation: Since we can’t see your project, share an annotated schematic (best) or a clear drawing of your setup. Pictures are welcome, but avoid using Fritzing diagrams as they are wiring diagrams, not schematics, and are not ideal for troubleshooting.
  3. Include Technical Details: If there is specific hardware involved, include links to technical information. There are often many versions of similar components, so precise details are essential.
  4. Reference Resources: For additional help, check out useful links and tutorials: Useful Links on Arduino Forum.

sharing my github ? will it be usefull contains all the code ?
my code works for case When the outside temperature is higher than the desired temperature or When the outside temperature is lower than or equal to the desired temperature,
the issue with implemnting Irrigation times should be scheduled to occur twice a day, taking into account that priority will be given to irrigation in the evening or in the shade.
i just have no idea how to set schedule for this code

i am useing components:
esp32 Wrover Module
soilmoisture

Light sensor
water pump
dht22

That is a nice link but it does not show your code or schematic. Many users do not go to external links for schematics code etc.

Sorry I had assumed you read the forum guidelines and would post your code using code tags. As it is now I cannot follow it. Do not forget the annotated schematic.

Can you delete the post , this is way too complicated , thanks for the fast responds.

The OP has indicated that he / she no longer requires help for this, so I am closing the topic.

@capgodx ,
If you change your mind do please ask a moderator to open the topic.

Thank you.