The present invention is related to a method for controlling a fryer (1) comprising a vat (3), a logic unit (9) and a manual validation interface (70, 72), the method comprising the following steps: S.1) carrying out a learning frying run, in its turn 1 0 comprising the following steps: S.1.1) placing a first batch of food to be fried in a cooking medium contained in the vat (3), the food to be fried being of a predetermined kind; S.1.2) when the food to be fried reaches a desired frying condition, communicating to the logic unit (9) through the manual validation interface (70, 72) that the food has reached said desired frying condition; S.2) carrying out a successive frying run comprising the following steps: S.2.1) placing a second batch of food to be fried in the cooking medium contained in the vat (3), the food of the second batch being substantially of the same kind as of the food of the first batch; S.2.2) frying the second batch of food for a frying time determined by the logic unit (9) depending on the desired frying condition signalled through the manual validation interface (70, 72) during the learning frying run. The invention is also related to a fryer (1) programmed or however arranged for carrying out the method and comprising a vat (3), a logic unit (9) and a manual validation interface (70, 72), and to a computer program arranged for enabling the fryer (1) to carry out the method