I want to write a scheduling algorithm for the following scenario:

There is a set of tasks to complete, each one with a due date, difficulty (easy, normal, hard) and progress on the task. The idea is that the user specifies the amount of daily hours available to work on tasks, so the algorithm can create a weekly schedule so the user can work in the tasks that require most attention, scheduled within the interval of hours (e.g. from 9:00 AM to 1:00 PM) the user decides. I have thought to require the user to specificate an approximate amount of time it needs to be used to complete each of the tasks.

The criteria would be priorizing the tasks with the nearest due date, highest difficulty and lowest progress first, then go for the tasks with nearest due date, highest difficulty and medium progress afterwards and so on.

What came to my mind was to create a function to calculate the value of a specific task, the higher the value, the more importance it has. With that in mind, sort all tasks by due date and by this calculated value using some greedy technique, but the issue here is what amount of time to dedicate on each task per day.

What kind of algorithm would this be? Is there any solution or book reference?

  • $\begingroup$ The title you have chosen is not well suited to representing your question. Please take some time to improve it; we have collected some advice here. Thank you! $\endgroup$
    – Raphael
    Commented Sep 9, 2018 at 22:09
  • $\begingroup$ Take into account the cost of missing a deadline. You can drop a task completely if it has little value. $\endgroup$
    – gnasher729
    Commented Aug 20, 2022 at 9:23

1 Answer 1


This issue is simply creating a weighted function modeling the importance of each assignment. The priority function should take into account the difficulty, due date, and other factors you choose with a weighted sum of these factors.

As for the difficulty, my suggestion would be to have a difficulty scale 1-10 that the user chooses, and create your weighted function based on that, so more difficult assignments will have a higher priority.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.