Dynamic changes of grid entities can result in security problems in the grid environment and in efficient use of resources. Resource provider may maliciously exaggerate resource performance and unilaterally contract termination. The original deadline and budget constraint method for resource scheduling is not suitable for unreliable environment. By employing trust mechanism into grid environment, a minimum opportunity cost(MOC) algorithm was for resource scheduling to bridge this gap. This algorithm first filters most of the lower-trust resources basing on user's trust demand. Then in the light of the high price and risk factors of the remained reliability resources, it chooses the optimal resources of minimum cost. Simulation results show that the algorithm gives two-fold incentives. It effectively guarantees profit of reliable resource provider, and reduces job failure rate and cost of user.