Why doesn't work this circuit? I would like to sense the temperature raising
This circuit might not work, as the 358 has a maximum high level output voltage (VOH) which is about 2V below the positive rail.

Even when the output is high (3V), considering the diode drop, the maximum voltage you could bring to the non inverting input is 2.4V. That is, the non inverting input will not remain higher than the inverting input (which is 2.5V). In other words there could not be hysteresis.

Solutions:


Use a rail to rail output op amp.
In the resistor divider network for the non-inverting input: put a
smaller value than 100k on the resistor connected to groun. Use 47k,
for instance.
Increase the supply voltage, for instance to 10. That way, Voh=8V,
and 8-0.6 V > 4 V.