Intermittent Relay Issue
When the relay closes, the charging of the 1000-uF/50V capacitor can create a large inrush current -- assuming that the 24-VDC power supply has a large output capacitor that can supply the inrush current. This inrush current could exceed the relay ratings and weld the contacts.

Some possible solutions are the following:

(1) Use a much smaller capacitor value in place of the 1000-uF cap if you don't need the extra holdup time. The LM340T-5 datasheet only calls for a 0.22-uF capacitor.

(2) Add some series resistance before the 1000-uF capacitor to limit the inrush current. Since the contacts have a 10-amp rating, you only need a few ohms to limit the inrush at 24 volts. You may need to check the pulse-energy rating of the resister because now the resistor will absorb the inrush energy: (24V^2)(1000 uF) / 2  = 0.29 watt-seconds

(3) Use a relay rated for a tungsten load, which can handle a high inrush. The inrush current should still be checked against the relay limits (either measure the inrush or calculate the inrush from the capacitor ESR value).