This paper addresses the searchlight guarding problem, which is an extension of so-called graph searching/guarding problem on a weighted, undirected graph G by considering the time-slot parameter in addition to the traditional building cost. Given a weighted, undirected graph G, suppose that there is a fugitive moving along the edges of G at an unknown speed. The task involves placing a set of searchlights at vertices to search the edges of the graph and to spot the fugitive. Assume that it costs some building cost to arrange a searchlight at some vertex. The searchlight guarding problem is to allocate a set S of searchlights at the vertices such that the total costs of the vertices for S is minimized. Furthermore, for all sets of searchlights with a minimum building cost, the one with the minimum search time will be selected, that is, the time slots needed to spot the fugitive are furthermore required to be minimized. The searchlight guarding problem has been known to be NP-hard on weighted bipartite graphs. But it is linear-time-solvable on weighted trees, weighted interval graphs, and weighted two-terminal series-parallel graphs. In this paper, the searchlight guarding problem is first proved to be NP-hard on weighted split graphs. Next, a linear time optimal algorithm to solve the problem on weighted cographs is designed. The algorithm is divided into two phases: In the first phase, a set of searchlights with a minimum guarding cost is identified and the search directions of all edges are assigned by the dynamic programming strategy. To achieve the task involved in phase one, a new graph problem, the edge-direction assignment problem on weighted complete-bipartite graphs, is defined and solved using the greedy strategy. In the second phase, the search time slots of each edge are determined. Both phases take linear time.