ESP32 Scheduling

I am working with ESP32 and Arduino IDE. I don’t understand how to perform following tasks with FreeRTOS

System tick 1ms

Task 1 needs to run for 8ms. It run 1 time in 40 ms. Priority 2
Task 2 needs to run for 5ms. It run 2 times in 40 ms. Priority 1
Task 3 needs to run for 10ms. It run 2 times in 40 ms. Priority 3

On a single core CPU, the tasks would be executed like this.
TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT…
22222111111113333333222223333333333333…

How it can be achieve in free rtos. Which library will be used ?

FreeRTOS does not provide a way for you to say how long a task should run for. It will run the highest priority task that is able to run (not blocked waiting for an event or suspended). So if a task starts to run it will continue running until it blocks (for example, attempting to read from an empty queue, or it calls vTaskDelay(), or any other blocking function) or a higher priority task is able to run, or a tick interrupt results in a context switch to a task that has the same priority as the running task.

I recommend you do a little background reading before using the OS. This is a very good starting point: https://freertos.org/Documentation/RTOS_book.html

Thanks Richard sir

Can you recommend demo code for ESP32 Arduino IDE