A problem of optimizing the cost function incorporated into the transmission cost is proposed for completely unknown discrete-time systems in this article. At first, a switched system containing two modes is formulated based on whether the triggering is executed or not, and the corresponding cost function and output feedback control law are also derived. By giving the formulated switched system, the triggering signal turns into the switching signal and the proposed problem is converted into an optimal control problem for the formulated discrete-time switched system. Secondly, a model network is presented to approximate the system dynamic since the dynamic model is completely unknown. Thirdly, in view of ADP-based optimal control methods of switched systems, critic and actor networks are applied respectively to approximate the optimal cost function and the optimal output feedback control law, and a PI-based online learning method is proposed. When weights of critic and actor networks are obtained and implemented through the proposed online learning method, the optimal triggering signal is derived. Fourthly, the convergent property is given to guarantee the obtained results are optimal. At last, the validity of the proposed method is shown by simulation results of two examples.