That *may* work as the schematic is correct. However it also depends on both the voltage rating of that relay, and the current rating of that transistor.
Also, how long you plan to have the switch on? It's possible that the transistor will heat up over time and fry. My preference would be to replace that resistor and transistor for a high efficiency MOSFET and back-emf protection diode.