Permutation codes have received a great attention due to various applications. For different applications, one needs permutation codes under different metrics. The generalized Cayley metric was introduced by Chee and Vu  and this metric includes several other metrics as special cases. However, the generalized Cayley metric is not easily computable in general. Therefore the block permutation metric was introduced by Yang et al.  as the generalized Cayley metric and the block permutation metric have the same magnitude. From the mathematical point of view, the block permutation metric is not natural as the last pair $(n,1)$ is not included in the characteristic set. In this paper, by including $(n,1)$ in the characteristic set, we introduce a new metric that is called cyclic block permutation metric. Under this new metric, we introduce a class of codes that are called cyclic block permutation codes. Based on some techniques from algebraic function fields originated in , we give an algebraic-geometric construction of cyclic block permutation codes with reasonably good parameters. By observing a trivial relation between cyclic block permutation metric and block permutation metric, we produce non-systematic codes in block permutation metric that improve all known results given in ,. More importantly, based on our non-systematic codes, we provide an explicit and systematic construction of block permutation codes which improves the systemic result shown in . In the end, to demonstrate that our cyclic block permutation codes indeed have reasonably good parameters by showing that our construction beats the Gilbert-Varshamov bound.