As the interdiscipline of wireless communication and control engineering, the cooperative charging issue in wireless rechargeable sensor networks (WRSNs) is a popular research problem. With the help of wireless power transfer technology, electrical energy can be transferred from wireless charging vehicles to sensors, providing a new paradigm to prolong the network lifetime. However, existing techniques on cooperative charging usually take the periodical and deterministic approach but neglect the influences of the nondeterministic factors such as topological changes and node failures, making them unsuitable for largescale WRSNs. In this paper, we develop a primary and passer-by scheduling (P <sup xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">2</sup> S) algorithm for on-demand charging architecture for large-scale WRSNs. In P <sup xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">2</sup> S, task interdependence is utilized to enhance charging efficiency. We exploit a local searching algorithm, in which nearby nodes on the way to primary nodes, which are the targets of wireless charging vehicle's current movement, will be charged as passer-by nodes. Such a strategy not only makes full use of the available remaining time of a charging deadline but solves the complex scheduling problem with spatial and temporal task interdependence as well. Analysis and simulations are conducted to show the superiority of our scheme, revealing that P <sup xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">2</sup> S has a higher survival rate and throughput, as well as other performance metrics.