In some manufacturing systems, it is important to study just-in-time (JIT)scheduling problems that include both earliness and tardiness penalty. This paper in-vestigates single-machine scheduling problems with simultaneous considerations of due-window assignment, position-dependent and convex resource-dependent processing times,and a deteriorating rate-modifying activity. The goal is to determine the optimal positionof due-window, resource allocations, job processing sequence, and position of the dete-riorating rate-modifying activity that minimize the total schedule penalty cost under thecondition that the total weighted resource consumption cost does not exceed a given upperbound, and the inverse version, where the total schedule penalty cost is a weighted sumfunction of earliness, tardiness, due-window starting time, due-window size, makespanand total completion time. For the three most widely used due-window assignment types,i.e., the common due-window (CONW), the slack due-window (SLKW), and the differentdue-window (DIFW), we show that all the considered problems can be solved in polyno-mial time.