Yes, that’s possible, but it takes some commercial software as there is no freeware that is easy to use or can schedule recordings.
Take a look at Audio Hijack Pro. It can record any sound on your iMac, including streaming radio, music from iTunes music from a website and music from the audio input, such as from an record or tape player, and even Skype calls. It can start a recording with one click, and the finished recordings can be dropped into iTunes to listen to later and moved to an iPod, too. You can also work with audio filters to remove noise and change levels, and more. It’s $32 for a license. Audio Hijack Pro: Record Any Audio On Mac OS X.
And then there’s Radioshift, from the same software maker. It records Internet streaming broadcasts and can schedule recordings, too, and record in the background while you do other work. It has a directory of over 100,000 Internet radio stations, searchable by name and genre. It’s $32 for a license, too. Radioshift: Easy Internet Radio Playback And Recording, Only For Mac OS X.
Both of those are for streaming music over the Internet and recording whatever sound you hear on your Mac, but there is also device that lets you tune in over-the-air AM/FM broadcasts and listen to them through your iMac and record them, too. Many stations don’t stream their boradcasts live, and sometimes if they do, the streams can be unreliable and drop out, so the Radio Shark 2 might be handy to have. It’s USB powered, too, so there is no “wall wart” needed. See Radio SHARK 2 – AM/FM Radio Recorder.