Well you pretty much just said it right there. Just make a trigger with a periodic time event and order a structure to conduct the research or upgrade.
For example:
Event- Periodic Event: Every ??? seconds of game time
Action- Unit: issue order with no target- Order (unit/research owning building) to research (tech).
It would be pretty much the same trigger for making a town hall-type unit to upgrade to the next structure, but instead of ordering a unit to research, you would be ordering it to upgrade.
Hope this helps.
-VGsatomi