This has been done before. Please use the Search feature in the future.
Code:
 on *:connect:{
var %a = 1, %b = $lines(channels.txt)
while %a <= %b {
.timer 1 $calc(%a * 60) join $read(channels.txt,%a)
inc %a
}
}
 

Make a text file called channels.txt and have the channels listed one per line, with the full channel name.
If this seems too slow, change the 60 to a lower number.
Channels that require keys have not been incorporated, but I can add them if needed.