We consider the following general scheduling problem: there are m identical machines and n jobs all released at time 0. Each job j has a processing time pj, and an arbitrary non-decreasing function fj that specifies the cost incurred for j, for each possible completion time. The goal is to find a preemptive migratory schedule of minimum cost. This models several natural objectives such as weighted norm of completion time, weighted tardiness and much more. We give the first O(1) approximation algorithm for this problem, improving upon the O(loglognP) bound due to Moseley (2019). To do this, we first view the job-cover inequalities of Moseley geometrically, to reduce the problem to that of covering demands on a line by rectangular and triangular capacity profiles. Due to the non-uniform capacities of triangles, directly using quasi-uniform sampling loses a O(loglogP) factor, so a second idea is to adapt it to our setting to only lose an O(1) factor. Our ideas for covering points with non-uniform capacity profiles (which have not been studied before) may be of independent interest.