As long as the software is designed for this purpose and the port itself is capable to hold the voltage on the two pins for the Times involved, (assuming the relay requires a continuous voltage for activation and not a Coded pulse on/off intermittent signal, which would be better as the actual current would be much less over time), I cannot see any issues, it's just down to the Math(s)