Linux: Recording real time audio in 30 minutes chunks

I’m using Fedora Core on an i386 platform. I have a sound card that seems to be working fine and allows me to record to a file from either the mic or a line in. What I’d like to do is attach a radio scanner to the line in and record the scanner output to a file (preferably mp3, but I’m not picky at this point) in 30 minute long files 24 hours a day. I’d like this to be automated so I don’t have to manual start and stop recording. I’m not really interested in streaming this audio–although I’d use icecast if someone could show me how it could solve my problem–but just want an archive of the radio traffic.

I use to be more proficient with linux, but I’ve never been a coder. I’m sure a script would serve my purpose, but I wouldn’t know what to put in it. I’d love to have an application that could take care of it all.

Any thoughts?