The unique topic of allocating and scheduling tasks on a single machine in a multitasking environment is the main emphasis of this research, which also takes into account the effects of worsening maintenance and job-dependent aging effects. In this scenario, the performance and efficiency of the machine in handling different tasks should be symmetric, without significant bias due to the nature or size of the tasks. In a multitasking environment, waiting for jobs can disrupt the processing of the primary job being currently handled. As a result, the actual time required to complete a task becomes erratic and contingent upon the duration of the disruption. In addition to figuring out the best time for maintenance, where to put the due-window, and how big it should be in a multitasking environment, the primary objective is to minimize the costs associated with meeting due-window regulations. To tackle this problem, we propose two optimal algorithms. Additionally, we conduct numerical experiments to compare our approach with the classic due date assignment problem. Interestingly, we observe that in most cases, the average and minimum percentage costs tend to increase as the quantity of jobs increases. However, it is noteworthy that, when the number of jobs is relatively small, specifically when it does not exceed 20, there are instances where these costs decrease with an increase in the number of jobs.