We introduce a comprehensive modeling framework for the problem of scheduling a finite number of finite-length jobs where the available service rate is time-varying. The main motivation comes from wireless data networks where the service rate of each user varies randomly due to fading. We employ recent advances on the restless bandit problem that allow us to obtain an opportunistic scheduling rule for the system without arrivals. When the objective is to minimize the mean number of users in the system or to minimize the mean waiting time, we obtain a priority-based policy which we call the "Potential Improvement" (PI) rule, since the priority index equals the ratio between the current available service rate and the expected potential improv...