Actually you need to make sure it is NOT pure iron. Carbon steel (like 1006, 1008, 1010) will usually do the trick.
Considering you are planning on having the magnet on for 20-30 seconds, you will need to pay major attention to the current you pass through it, inductive coil wire (ie magnetic wire) usually has two ratings, the operating current and the fusing current. Operating current is what level of heat it can dissipate continuously on its own, fusing current is the current that immediately starts melting the coating and wire together. For 20-30 seconds you are looking at something around 10-20% of the fusing current. All of this is dependent on the type of sealant used (nylon, acrylic, etc), how tightly wrapped the coil is (so heat can dissipate), etc.
Here's some general numbers for the more common wire sizes (available at radio shack):
22awg - op cur: 0.65a fuse: 41a
26awg - op cur: 0.25a fuse: 20a
30awg - op cur: 0.1a fuse: 10a