Divide it into parts:
You have a description of the task, which may have some restrictions on where it is performed, and you have a queue of tasks that need to be performed, generally speaking, if there are no other restrictions that you would expect the tasks to be performed in order, t .e. you take them from the front of the line and add them to the end.
If we run the queue in a separate table, then the tasks will have 3 states:
- Does not work
- Performed
- Completed
- ( n , ), , . , n , n , , .
:
- DateQueued ( )
- DateStarted ( ) -
- AssignedTo
, DateCompleted, , ( ).
, ( "" ) :
, , "-", reset .
.
- ID
- JobID - ,
- StatusID
- DateQueued
- DateStarted
- AssignedToID
- DateCompleted
, ...