I just realized you posted this exact thing just a few posts down. It's really straight forward. Create a task to turn on DND then start the timer. In the other post I linked a more battery friendly way to do timers.
If you are unable to get it to work, post the description of your task that isn't working. There is a sticky post in this forum with instructions on how to post your task description.