Flip
Design a Job/Task scheduler platform.
The platform should be able to accept and schedule tasks. The tasks should be executed on the scheduled time.
Requirements:
Input - Taks, Time
1000-Tasks/Min-
ScheduleTask( user, time, task) - short time tasks - first check whether user is added, if not return - add it db for the day
Background Workers - free thread ,
AddUser - db
ExecuteTask() -
PQ - task for that day - t1, t2
T1 - today time
T2 - tom - db
T3 - today after t1
T4- 1 year - db
ScheduleTask
{
Userid:int,
ScheduleTime: datetime
Task: object
}
No comments:
Post a Comment
Comment!!