The transition of more and more companies from their own computing infrastructure to the clouds is due to a decrease in the cost of maintaining it, the broadest scalability, and the presence of a large number of tools for automating activities. Accordingly, cloud providers provide an increasing number of different computing resources and tools for working in the clouds. In turn, this gives rise to the problem of the rational choice of the types of cloud services in accordance with the peculiarities of the tasks to be solved. One of the most popular areas of effort for cloud consumers is to reduce rental costs. The main base of this direction is the use of spot resources. The article proposes a method for reducing the cost of renting computing resources in the cloud by dynamically managing the placement of computational tasks, which takes into account the possible underutilization of planned resources, the forecast of the appearance of spot resources and their cost. For each task, a state vector is generated that takes into account the duration of the task and the required deadline. Accordingly, for a suitable set of computing resources, an availability forecast vectors are formed at a given time interval, counting from the current moment in time. The technique proposes to calculate at each discrete moment of time the most rational option for placing the task on one of the resources and the delay in starting the task on it. The placement option and launch delays are determined by minimizing the rental cost function over the time interval using a genetic algorithm. One of the features of using spot resources is the auction mechanism for their provision by a cloud provider. This means that if there are more preferable rental prices from any consumer, then the provider can warn you about the disconnection of the resource and make this disconnection after the announced time. To minimize the consequences of such a shutdown, the technique involves preliminary preparation of tasks by dividing them into substages with the ability to quickly save the current results in memory and then restart from the point of stop. In addition, to increase the likelihood that the task will not be interrupted, a price forecast for the types of resources used is used and a slightly higher price is offered for the auction of the cloud provider, compared to the forecast. Using the example of using the Elastic Cloud Computing (EC2) environment of the cloud provider AWS, the effectiveness of the proposed method is shown.