If you want to use MQL4 look at the OrderOpenTime() function, add the relevant number of seconds to the return value and when that time arrives call OrderClose().
For other platforms it depends on what automation facilities are available. Most spread betting firms do not seem to keen on providing facilities for automated trading.