Automatic backup of sql express

Microsoft have crippled the sql express edition such that you can’t do a scheduled backup in the same way that you can with the standard sql servers. However by running a backup and saving the commands to a script you can then run it – but the method to use it is not obvious.
The installation of sql express edition gives a management interface to create the script and by using the command sqlcmd -S LOCALHOST\SQLEXPRESS -i backup.sql -o output.txt you can then run this using your favourite scheduling program. Thanks to Ryec on the Microsoft Forums, (scroll down)