Network lifetime plays an integral role in setting up an efficient wireless sensor network. The objective of this paper is twofold. The first one is to deploy sensor nodes at optimal locations such that the theoretically computed network lifetime is maximum. The second is to schedule these sensor nodes such that the network attains the maximum lifetime. Thus, the overall objective of this paper is to identify optimal deployment locations of the given sensor nodes with a pre-specified sensing range, and to schedule them such that the network lifetime is maximum with the required coverage level. Since the upper bound of the network lifetime for a given network can be computed mathematically, we use this knowledge to compute locations of deployment such that the network lifetime is maximum. Further, the nodes are scheduled to achieve this upper bound. In this paper, we use artificial bee colony algorithm and particle swarm optimization for sensor deployment problem followed by a heuristic for scheduling. A comparative study shows that artificial bee colony algorithm performs better for sensor deployment problem. The proposed heuristic was able to achieve the theoretical upper bound in all the experimented cases.