Cloud services can compensate for the resource constraints of mobile devices. However, challenges of utilizing the cloud service by mobile users arise from inherent characteristics such as user mobility and device energy. In this paper, we propose a scheme to monitor the energy level and communication quality as a part of a mobile user context information, and develop a resource allocation and scheduling scheme to adapt to the context changes by exploiting the slack time. The objective is to reduce the execution cost of the jobs while meeting the jobs deadlines set by the users. We developed Simulated Annealing based resource allocation algorithm and Earliest Deadline First scheduling. Simulation of our scheme using CloudSim and synthetic workload based on Google Cluster Traces shows benefits in reducing execution cost and improving resource utilization.