protected function execute($arguments = array(), $options = array()) { // initialize the database connection $databaseManager = new sfDatabaseManager($this->configuration); $connection = $databaseManager->getDatabase($options['connection'])->getConnection(); // add your code here $route_list = Routes2011Peer::getAllDistinctRouteId(); foreach ($route_list as $route) { echo $route->getRouteid() . "\n"; } }