First, enable automatic updates like this:
sudo apt-get install unattended-upgrades
You then need to edit its configuration, type
sudo nano /etc/apt/apt.conf.d/50unattended-upgrades
nano with your preferred text editor if you want)
The file looks like this:
// "Ubuntu maverick-updates";
// means this line is a comment and won't be considered by the program, remove the strokes to include stable release updates in addition to security fixes. Also, replace
maverick with the version of Ubuntu you're running.
To set the interval at which the system checks for updates, edit the
/etc/apt/apt.conf.d/10periodic file with a text editor:
In this example, the system is updated every two weeks.
For a more detailed explanation, see Automatic Updates in the Ubuntu server guide.
Note that papukaija's answer is talking about the interval at which the Update Manager dialogue pops up on your screen, I'm guessing that's not what you wan't, but I'm not sure. :)