Im trying to create a new ticket event which check pending time of state and trigger if its equals to 0 minutes.

On the other hand...
Alternatively, how/where can i change the code of this in syscfg for in addition to setting the status after the pending reached, place a note on the ticket, like "Pending date ended".

For now, after a lot of scrolling through the various files (TicketUpdate.pm, GenericAgent.pm, etc...) I don't know where to start, or what code to add to do what I want.