Getting a console command that uses ent_fire to repeat?

Trying to get “ent_fire npc_combine_s setsquad 1” to fire every 20 seconds, but you can’t use ent_fire with RunConsoleCommand because the command is blocked. Any clues as to how to do it?

for id, ent in pairs( ents.FindByClass(“npc_combine_s”)) do
ent:Fire(“SetSquad”, “1”)

I know no lua whatsoever, what does that mean and how do I get it to work every 20 seconds automatically?

timer.Create( "CombineFire", 20, 0, function()
   for _, ent in ipairs( ents.FindByClass( "npc_combine_s" ) ) do
      ent:Fire("SetSquad", "1")

It didn’t work for me.