I'm creating a simple program in php that manages task to different users. And each task will be given to users in sequence or one by one entry to Table Task. Assuming I have (Task Table) and (Users Table), once a new record in task table enters it will be assigned to an online user. For example we have 3 online users. If a new task enters to table TASK it will be assigned to USER1 then if another task again enters to task table now it will be assigned to USER2 . So we now have TASK1 assigned to USER1 and TASK2 assigned to USER2. if another enters the task table it will be assigned to USER3. Then if a fourth or more TASK enters the table again it will be assigned to USER1 again and the flow continues. Can anyone help me create an optimize algorithm for this. Thanks!
Aucun commentaire:
Enregistrer un commentaire