I need to assign accounts to territories. So, as soon as a new account record is created, I want to assign it to a territory based on some business rules and conditions.
I am able to write an trigger and apex class to achieve it but I want to run this code only during the weekdays. So any new accounts coming during weekdays should be assigned immediately
why while the ones coming over the weekend should be processed on on Monday.
How can I achieve this? I don't think a trigger can be configured to run during specific times. How can I design for this requirement then?