The cannon is an important source of new workers, useful resources, and dynamite. At the basic level, it fires one new goblin each 40 min. The goblin level is indicated on the cannon and increases every few goblins purchased.
 
 
The timer is reduced every time a checkpoint is activated. Find the Pocket Watch and the Alarm Clock rare cards to reduce the cannon's timer further.
 

Goblin Cannon also provides you with Mystical Barrels starting every 25 sec, but this time increases as barrels are opened. Remember that mystical barrels, unlike goblin barrels, don't stack. So, the new barrel will not appear until you pick up the previous one. Mystical barrels might contain gold, elixirs, goblins, and dynamite.
 

The amount of gold provided by barrels depends on your overall regular income (from the Forge and automated shafts) and can be increased using delivery cards. The level of goblins in the mystical barrels is your Goblin Cannon level -1. You can increase the level of goblins in barrels using cards. The level of dynamite matches the highest level among your goblin workers.  
 
Opening too many prizes in a row may cause the cannon to overheat, and it will be giving only gold.

Please let it cool down for a couple of hours, and it will work properly again, giving you not only gold but goblins, gems, and elixir!
 
Mystery barrels have a random factor in each cycle. If you get lucky and receive the higher rewards first, the next few deliveries may be lower. It will start increasing again after a while once the cycle resets.